Skip to content

Commit

Permalink
Enables some unit tests on travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik committed Jan 9, 2017
1 parent 049d7fa commit 2a85368
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
13 changes: 13 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -23,7 +24,7 @@
"yargs": "^3.14.0"
},
"scripts": {
"test": "gulp lint"
"test": "gulp lint unittestcli"
},
"repository": {
"type": "git",
Expand Down
18 changes: 18 additions & 0 deletions test/unit/clitests.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit 2a85368

Please sign in to comment.