diff --git a/types/jasmine-promise-matchers/index.d.ts b/types/jasmine-promise-matchers/index.d.ts index 3c05b5304e..ea001c711f 100644 --- a/types/jasmine-promise-matchers/index.d.ts +++ b/types/jasmine-promise-matchers/index.d.ts @@ -11,6 +11,11 @@ declare function installPromiseMatchers(): void; declare namespace jasmine { interface Matchers { + /** + * Verifies that a value is a $q Promise. + */ + toBePromise(): boolean + /** * Verifies that a Promise is (or has been) rejected. */ diff --git a/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts b/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts index 6ea4d32b94..dd3ac2fc8d 100644 --- a/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts +++ b/types/jasmine-promise-matchers/jasmine-promise-matchers-tests.ts @@ -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();