2017-05-25 13:09:29 +00:00
|
|
|
module.exports = function (grunt) {
|
|
|
|
const buildDir = "dist";
|
2017-10-10 19:59:20 +00:00
|
|
|
const schemaDir = "server/src/lib/configuration/Configuration.schema.json"
|
2019-01-26 16:15:35 +00:00
|
|
|
|
2017-05-13 16:12:26 +00:00
|
|
|
grunt.initConfig({
|
2018-12-18 15:30:23 +00:00
|
|
|
clean: {
|
|
|
|
dist: ['dist'],
|
|
|
|
},
|
2017-05-13 16:12:26 +00:00
|
|
|
run: {
|
2017-10-06 22:09:42 +00:00
|
|
|
"test-server-unit": {
|
|
|
|
cmd: "./node_modules/.bin/mocha",
|
2018-07-08 15:02:28 +00:00
|
|
|
args: ['--colors', '--require', 'ts-node/register', 'server/src/**/*.spec.ts']
|
2017-05-13 16:12:26 +00:00
|
|
|
},
|
2018-10-27 16:18:25 +00:00
|
|
|
"test-shared-unit": {
|
|
|
|
cmd: "./node_modules/.bin/mocha",
|
|
|
|
args: ['--colors', '--require', 'ts-node/register', 'shared/**/*.spec.ts']
|
|
|
|
},
|
2018-08-09 20:24:02 +00:00
|
|
|
"test-cucumber": {
|
2017-10-16 22:38:10 +00:00
|
|
|
cmd: "./scripts/run-cucumber.sh",
|
|
|
|
args: ["./test/features"]
|
2017-07-16 12:55:01 +00:00
|
|
|
},
|
2018-08-19 14:51:36 +00:00
|
|
|
"test-complete-config": {
|
|
|
|
cmd: "./node_modules/.bin/mocha",
|
|
|
|
args: ['--colors', '--require', 'ts-node/register', 'test/complete-config/**/*.ts']
|
|
|
|
},
|
2018-08-09 20:24:02 +00:00
|
|
|
"test-minimal-config": {
|
|
|
|
cmd: "./node_modules/.bin/mocha",
|
|
|
|
args: ['--colors', '--require', 'ts-node/register', 'test/minimal-config/**/*.ts']
|
|
|
|
},
|
2018-10-22 07:35:06 +00:00
|
|
|
"test-inactivity": {
|
|
|
|
cmd: "./node_modules/.bin/mocha",
|
|
|
|
args: ['--colors', '--require', 'ts-node/register', 'test/inactivity/**/*.ts']
|
|
|
|
},
|
2017-05-25 13:09:29 +00:00
|
|
|
"apidoc": {
|
|
|
|
cmd: "./node_modules/.bin/apidoc",
|
|
|
|
args: ["-i", "src/server", "-o", "doc"]
|
2017-06-14 21:34:11 +00:00
|
|
|
},
|
2017-05-13 16:12:26 +00:00
|
|
|
},
|
|
|
|
});
|
2018-12-17 21:49:01 +00:00
|
|
|
|
2017-05-25 13:09:29 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
2018-12-17 22:27:58 +00:00
|
|
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
2017-05-13 16:12:26 +00:00
|
|
|
grunt.loadNpmTasks('grunt-run');
|
|
|
|
|
2019-01-27 14:54:29 +00:00
|
|
|
grunt.registerTask('test-server', ['run:test-server-unit'])
|
|
|
|
grunt.registerTask('test-shared', ['run:test-shared-unit'])
|
|
|
|
grunt.registerTask('test-unit', ['test-server', 'test-shared']);
|
2018-10-22 07:35:06 +00:00
|
|
|
grunt.registerTask('test-int', ['run:test-cucumber', 'run:test-minimal-config', 'run:test-complete-config', 'run:test-inactivity']);
|
2017-05-13 16:12:26 +00:00
|
|
|
};
|