mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add support for jasmine 2.2 Asynch timeout syntax
This commit is contained in:
@@ -712,6 +712,23 @@ describe("Asynchronous specs", function () {
|
||||
expect(value).toBeGreaterThan(0);
|
||||
done();
|
||||
});
|
||||
|
||||
describe("long asynchronous specs", function() {
|
||||
beforeEach(function(done) {
|
||||
done();
|
||||
}, 1000);
|
||||
|
||||
it("takes a long time", function(done) {
|
||||
setTimeout(function() {
|
||||
done();
|
||||
}, 9000);
|
||||
}, 10000);
|
||||
|
||||
afterEach(function(done) {
|
||||
done();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe("Fail", function () {
|
||||
|
||||
Vendored
+14
-14
@@ -10,25 +10,25 @@ declare function describe(description: string, specDefinitions: () => void): voi
|
||||
declare function fdescribe(description: string, specDefinitions: () => void): void;
|
||||
declare function xdescribe(description: string, specDefinitions: () => void): void;
|
||||
|
||||
declare function it(expectation: string, assertion?: () => void): void;
|
||||
declare function it(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function fit(expectation: string, assertion?: () => void): void;
|
||||
declare function fit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function xit(expectation: string, assertion?: () => void): void;
|
||||
declare function xit(expectation: string, assertion?: (done: () => void) => void): void;
|
||||
declare function it(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function it(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
declare function fit(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function fit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
declare function xit(expectation: string, assertion?: () => void, timeout?: number): void;
|
||||
declare function xit(expectation: string, assertion?: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
/** If you call the function pending anywhere in the spec body, no matter the expectations, the spec will be marked pending. */
|
||||
declare function pending(): void;
|
||||
|
||||
declare function beforeEach(action: () => void): void;
|
||||
declare function beforeEach(action: (done: () => void) => void): void;
|
||||
declare function afterEach(action: () => void): void;
|
||||
declare function afterEach(action: (done: () => void) => void): void;
|
||||
declare function beforeEach(action: () => void, timeout?: number): void;
|
||||
declare function beforeEach(action: (done: () => void) => void, timeout?: number): void;
|
||||
declare function afterEach(action: () => void, timeout?: number): void;
|
||||
declare function afterEach(action: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
declare function beforeAll(action: () => void): void;
|
||||
declare function beforeAll(action: (done: () => void) => void): void;
|
||||
declare function afterAll(action: () => void): void;
|
||||
declare function afterAll(action: (done: () => void) => void): void;
|
||||
declare function beforeAll(action: () => void, timeout?: number): void;
|
||||
declare function beforeAll(action: (done: () => void) => void, timeout?: number): void;
|
||||
declare function afterAll(action: () => void, timeout?: number): void;
|
||||
declare function afterAll(action: (done: () => void) => void, timeout?: number): void;
|
||||
|
||||
declare function expect(spy: Function): jasmine.Matchers;
|
||||
declare function expect(actual: any): jasmine.Matchers;
|
||||
|
||||
Reference in New Issue
Block a user