fix(test-coverage): coverage is back at CI

coverage was removed because it prevented failing tests from actually
failing on CI. This is an attempt at adding it back in.
This commit is contained in:
Daniel Lang 2018-01-11 21:12:59 +01:00
parent 7b4ea88629
commit fa17752dc5

View File

@ -29,11 +29,11 @@ export class Gulpfile {
// -------------------------------------------------------------------------
/**
* Creates a delay and resolves after 30 seconds.
* Creates a delay and resolves after 15 seconds.
*/
@Task()
wait(cb: Function) {
setTimeout(() => cb(), 30000);
setTimeout(() => cb(), 15000);
}
/**
@ -325,8 +325,17 @@ export class Gulpfile {
/**
* Runs post coverage operations.
*/
@Task("coveragePost", ["coveragePre"])
@Task()
coveragePost() {
return gulp.src(["./build/compiled/test/**/*.js"])
.pipe(istanbul.writeReports());
}
/**
* Runs mocha tests.
*/
@Task()
runTests() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
@ -336,22 +345,6 @@ export class Gulpfile {
bail: true,
grep: !!args.grep ? new RegExp(args.grep) : undefined,
timeout: 15000
}))
}
/**
* Runs tests the quick way.
*/
@Task()
quickTests() {
chai.should();
chai.use(require("sinon-chai"));
chai.use(require("chai-as-promised"));
return gulp.src(["./build/compiled/test/**/*.js"])
.pipe(mocha({
bail: true,
timeout: 15000
}));
}
@ -381,9 +374,11 @@ export class Gulpfile {
@SequenceTask("ci-tests")
ciTests() {
return [
"wait",
"compile",
"tslint",
"wait",
"coveragePre",
"runTests",
"coveragePost",
"coverageRemap"
];