forked from feedhenry/fh-mbaas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·29 lines (19 loc) · 1.18 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
_test_runner: '_mocha',
_unit_args: '-b -A -u exports -t 10000',
optional: ['mocha -A -u exports --recursive -t 10000 test/accept/test-backoff.js'],
unit: ['echo $NODE_PATH', '<%= _test_runner %> <%= _unit_args %> --recursive ./test/unit/**/test*.js'],
// use `grunt fh:testfile:{{unit_test_filename}}` to run a single test file
unit_single: ['<%= _test_runner %> <%= _unit_args %> <%= unit_test_filename %>'],
accept: ['turbo --series=true --setUp=test/accept/server.js --tearDown=test/accept/server.js test/accept/test-sys.js test/accept/test-api.js test/accept/test-dataSourceUpdater.js'],
unit_cover: ['istanbul cover --dir cov-unit -- node_modules/.bin/_mocha <%= _unit_args %> --recursive ./test/unit/**/test*.js'],
accept_cover: [
'istanbul cover --dir cov-accept ./node_modules/.bin/turbo -- --series=true --setUp=test/accept/server.js --tearDown=test/accept/server.js test/accept/test-sys.js test/accept/test-api.js'
]
});
grunt.loadNpmTasks('grunt-fh-build');
grunt.registerTask('default', ['eslint', 'fh:dist']);
grunt.registerTask('coverage', ['fh:coverage']);
};