UNPKG

1.66 kBJavaScriptView Raw
1/**
2 * Copyright 2014 Skytap Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 **/
16
17var extend = require('extend'),
18 should = require('should');
19
20// should.eql is deprecated. turn off warnings for now.
21should.warn = false;
22
23module.exports = function (grunt) {
24 grunt.loadNpmTasks('grunt-mocha-test');
25 grunt.loadNpmTasks('grunt-shell');
26
27 grunt.registerTask('tests', [
28 'mochaTest:unit',
29 'shell:functional',
30 'shell:cucumber'
31 ]);
32
33 grunt.initConfig({
34 mochaTest : {
35 options : {
36 reporter : 'dot',
37 require : [
38 'should',
39 './test/lib/nocache.js'
40 ]
41 },
42 unit : {
43 src : [
44 'test/unit/**/*.js'
45 ]
46 }
47 },
48
49 shell : {
50 functional : {
51 command : './test/minorjs-test',
52 options : {
53 execOptions : {
54 env : extend({ MOCHA_COLORS : true }, process.env)
55 }
56 }
57 },
58
59 cucumber : {
60 command : './test/minorjs-cuke-test',
61 options : {
62 execOptions : {
63 env : extend({ MOCHA_COLORS : true }, process.env)
64 }
65 }
66 }
67 }
68 });
69};
\No newline at end of file