Fix build break due to missing error.
Add a new task testci which uses the xunit reporter. Add a watch task to monitor and run tests in dev box.
This commit is contained in:
Родитель
376c8ce924
Коммит
e3c08744ce
11
gulpfile.js
11
gulpfile.js
|
@ -36,7 +36,16 @@ gulp.task("clean", function(done) {
|
||||||
|
|
||||||
gulp.task("test", ["build"], function() {
|
gulp.task("test", ["build"], function() {
|
||||||
return gulp.src(testFiles, { read: false })
|
return gulp.src(testFiles, { read: false })
|
||||||
.pipe(mocha( { reporter: 'xunit', reporterOptions: { output: '_build/testTaskMochTestResult.xml'} } ));
|
.pipe(mocha());
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task("testci", ["build"], function() {
|
||||||
|
return gulp.src(testFiles, { read: false })
|
||||||
|
.pipe(mocha({ reporter: 'xunit', reporterOptions: { output: '_build/testTaskMochaTestResult.xml'} }));
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task("watch", function() {
|
||||||
|
gulp.watch(sourceFiles, ["test"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("default", ["build"]);
|
gulp.task("default", ["build"]);
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
|
/// <reference path="../../../typings/tsd.d.ts" />
|
||||||
|
|
||||||
// Writes hello world!
|
// Writes hello world!
|
||||||
export class HelloWorldWriter {
|
export class HelloWorldWriter {
|
||||||
public Write(): void {
|
public Write(): void {
|
||||||
throw new Error("Not implemented");
|
// throw new TypeError("Not implemented");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
/// <reference path="../../typings/tsd.d.ts"/>
|
||||||
|
|
||||||
import * as assert from "assert";
|
import * as assert from "assert";
|
||||||
import * as testTask from "../../src/Tasks/TestTask/testTask";
|
import * as testTask from "../../src/Tasks/TestTask/testTask";
|
||||||
|
|
||||||
describe("HelloWorldWriter.Write", () : void => {
|
describe("HelloWorldWriter.Write", () : void => {
|
||||||
it("should throw not implemented error", () : void => {
|
it("should throw not implemented error", () : void => {
|
||||||
assert.throws(() : void => {
|
assert.doesNotThrow(() : void => {
|
||||||
// dummy code
|
// dummy code
|
||||||
var helloWorldWriter = new testTask.HelloWorldWriter();
|
var helloWorldWriter = new testTask.HelloWorldWriter();
|
||||||
helloWorldWriter.Write();
|
helloWorldWriter.Write();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче