mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
types/jasmine-promise-matchers: add toBePromise matcher (#34858)
This commit is contained in:
parent
308c13ed4d
commit
a358c583ff
5
types/jasmine-promise-matchers/index.d.ts
vendored
5
types/jasmine-promise-matchers/index.d.ts
vendored
@ -11,6 +11,11 @@ declare function installPromiseMatchers(): void;
|
||||
declare namespace jasmine {
|
||||
|
||||
interface Matchers <T>{
|
||||
/**
|
||||
* Verifies that a value is a $q Promise.
|
||||
*/
|
||||
toBePromise(): boolean
|
||||
|
||||
/**
|
||||
* Verifies that a Promise is (or has been) rejected.
|
||||
*/
|
||||
|
||||
@ -8,7 +8,8 @@ describe('something', () => {
|
||||
it('should do something', () => {
|
||||
var foo = {};
|
||||
var bar = {};
|
||||
|
||||
|
||||
expect(foo).toBePromise();
|
||||
expect(foo).toBeResolvedWith(bar);
|
||||
expect(foo).toBeRejectedWith(bar);
|
||||
expect(foo).toBeResolved();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user