Added global fail() function to Jasmine typings

This commit is contained in:
David Pärsson
2015-02-04 11:28:29 +01:00
parent afca0689f7
commit 675a63e403
2 changed files with 18 additions and 0 deletions
+16
View File
@@ -714,6 +714,22 @@ describe("Asynchronous specs", function () {
});
});
describe("Fail", function () {
it("should fail test when called without arguments", function () {
fail();
});
it("should fail test when called with a fail message", function () {
fail("The test failed");
});
it("should fail test when called an error", function () {
fail(new Error("The test failed with this error"));
});
});
(() => {
// from boot.js
var env = jasmine.getEnv();
+2
View File
@@ -33,6 +33,8 @@ declare function afterAll(action: (done: () => void) => void): void;
declare function expect(spy: Function): jasmine.Matchers;
declare function expect(actual: any): jasmine.Matchers;
declare function fail(e?: any): void;
declare function spyOn(object: any, method: string): jasmine.Spy;
declare function runs(asyncMethod: Function): void;