Initial unit tests (using Mocha and Chai asserts).

This commit is contained in:
Alexander Zobnin
2016-08-14 11:58:23 +03:00
parent 2882a48f25
commit d247fc8a99
5 changed files with 136 additions and 8 deletions

View File

@@ -40,11 +40,13 @@ module.exports = function(grunt) {
babel: {
options: {
sourceMap: true,
presets: ["es2015"],
plugins: ['transform-es2015-modules-systemjs', "transform-es2015-for-of"],
presets: ["es2015"]
},
dist: {
options: {
sourceMap: true,
plugins: ['transform-es2015-modules-systemjs', "transform-es2015-for-of"]
},
files: [{
cwd: 'src',
expand: true,
@@ -57,6 +59,34 @@ module.exports = function(grunt) {
dest: 'dist/'
}]
},
distTestNoSystemJs: {
files: [{
cwd: 'src',
expand: true,
src: ['**/*.js'],
dest: 'dist/test'
}]
},
distTestsSpecsNoSystemJs: {
files: [{
expand: true,
cwd: 'specs',
src: ['**/*.js'],
dest: 'dist/test/specs'
}]
}
},
mochaTest: {
test: {
options: {
reporter: 'spec'
},
src: [
'dist/test/datasource-zabbix/specs/test-main.js',
'dist/test/datasource-zabbix/specs/*_specs.js'
]
}
},
sass: {
@@ -77,6 +107,7 @@ module.exports = function(grunt) {
'copy:src_to_dist',
'copy:pluginDef',
'babel',
'sass'
'sass',
'mochaTest'
]);
};