mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #30059 from cexbrayat/feat/jasmine-with-context
Jasmine: Adds withContext method on Matcher<T>
This commit is contained in:
Vendored
+6
@@ -454,6 +454,12 @@ declare namespace jasmine {
|
||||
toThrowError(message?: string | RegExp): boolean;
|
||||
toThrowError(expected?: new (...args: any[]) => Error, message?: string | RegExp): boolean;
|
||||
|
||||
/**
|
||||
* Add some context for an expect.
|
||||
* @param message - Additional context to show when the matcher fails
|
||||
*/
|
||||
withContext(message: string): Matchers<T>;
|
||||
|
||||
not: Matchers<T>;
|
||||
|
||||
Any: Any;
|
||||
|
||||
@@ -246,6 +246,12 @@ describe("A spec", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("withContext", () => {
|
||||
it("can be used after an expectation", () => {
|
||||
expect(1).withContext('context message').toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
xdescribe("A spec", () => {
|
||||
var foo: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user