Enables some unit tests on travis.
This commit is contained in:
parent
049d7fa277
commit
c45300e06c
13
gulpfile.js
13
gulpfile.js
@ -525,6 +525,19 @@ gulp.task('botmakeref', function (done) {
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('unittestcli', function (done) {
|
||||
var args = ['JASMINE_CONFIG_PATH=test/unit/clitests.json'];
|
||||
var testProcess = spawn('node_modules/.bin/jasmine', args,
|
||||
{stdio: 'inherit'});
|
||||
testProcess.on('close', function (code) {
|
||||
if (code !== 0) {
|
||||
done(new Error('Unit tests failed.'));
|
||||
return;
|
||||
}
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('lint', function (done) {
|
||||
console.log();
|
||||
console.log('### Linting JS files');
|
||||
|
@ -8,7 +8,8 @@
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-zip": "^3.2.0",
|
||||
"jasmine-core": "^2.4.1",
|
||||
"jasmine": "^2.5.2",
|
||||
"jasmine-core": "^2.5.2",
|
||||
"jsdoc": "^3.3.0-alpha9",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-ensure": "^0.0.0",
|
||||
@ -23,7 +24,7 @@
|
||||
"yargs": "^3.14.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp lint"
|
||||
"test": "gulp lint unittestcli"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
18
test/unit/clitests.json
Normal file
18
test/unit/clitests.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"spec_dir": "test/unit",
|
||||
"spec_files": [
|
||||
"cff_parser_spec.js",
|
||||
"crypto_spec.js",
|
||||
"dom_utils_spec.js",
|
||||
"evaluator_spec.js",
|
||||
"fonts_spec.js",
|
||||
"function_spec.js",
|
||||
"murmurhash3_spec.js",
|
||||
"parser_spec.js",
|
||||
"primitives_spec.js",
|
||||
"stream_spec.js",
|
||||
"type1_parser_spec.js",
|
||||
"unicode_spec.js",
|
||||
"util_spec.js"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user