mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
adds type definitions for jasmine-promise-matchers
This commit is contained in:
parent
6f04d25ad3
commit
f33b34e97c
17
jasmine-promise-matchers/jasmine-promise-matchers-tests.ts
Normal file
17
jasmine-promise-matchers/jasmine-promise-matchers-tests.ts
Normal file
@ -0,0 +1,17 @@
|
||||
/// <reference path="jasmine-promise-matchers.d.ts" />
|
||||
|
||||
describe('something', () => {
|
||||
beforeEach(() => {
|
||||
installPromiseMatchers();
|
||||
});
|
||||
|
||||
it('should do something', () => {
|
||||
var foo = {};
|
||||
var bar = {};
|
||||
|
||||
expect(foo).toBeResolvedWith(bar);
|
||||
expect(foo).toBeRejectedWith(bar);
|
||||
expect(foo).toBeResolved();
|
||||
expect(foo).toBeRejected();
|
||||
});
|
||||
})
|
||||
33
jasmine-promise-matchers/jasmine-promise-matchers.d.ts
vendored
Normal file
33
jasmine-promise-matchers/jasmine-promise-matchers.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
// Type definitions for jasmine-promise-matchers
|
||||
// Project: https://github.com/bvaughn/jasmine-promise-matchers
|
||||
// Definitions by: Matthew Hill <https://github.com/matthewjh>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
/// <reference path="../jasmine/jasmine.d.ts" />
|
||||
|
||||
declare function installPromiseMatchers(): void;
|
||||
|
||||
declare module jasmine {
|
||||
|
||||
interface Matchers {
|
||||
/**
|
||||
* Verifies that a Promise is (or has been) rejected.
|
||||
*/
|
||||
toBeRejected(): boolean;
|
||||
|
||||
/**
|
||||
* Verifies that a Promise is (or has been) rejected with the specified parameter.
|
||||
*/
|
||||
toBeRejectedWith(value: any): boolean;
|
||||
|
||||
/**
|
||||
* Verifies that a Promise is (or has been) resolved.
|
||||
*/
|
||||
toBeResolved(): boolean;
|
||||
|
||||
/**
|
||||
* Verifies that a Promise is (or has been) resolved with the specified parameter.
|
||||
*/
|
||||
toBeResolvedWith(value: any): boolean;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user