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:
Subrahmanyam Mandavilli 2015-12-08 18:26:26 +05:30
Родитель 376c8ce924
Коммит e3c08744ce
3 изменённых файлов: 17 добавлений и 5 удалений

Просмотреть файл

@ -36,7 +36,16 @@ gulp.task("clean", function(done) {
gulp.task("test", ["build"], function() {
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"]);

Просмотреть файл

@ -1,7 +1,8 @@
/// <reference path="../../../typings/tsd.d.ts" />
// Writes hello world!
export class HelloWorldWriter {
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 testTask from "../../src/Tasks/TestTask/testTask";
describe("HelloWorldWriter.Write", () : void => {
it("should throw not implemented error", () : void => {
assert.throws(() : void => {
assert.doesNotThrow(() : void => {
// dummy code
var helloWorldWriter = new testTask.HelloWorldWriter();
helloWorldWriter.Write();