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