Add type definitions for code expectation
This commit is contained in:
parent
ad2d96de0b
commit
b91f7e0da8
2 changed files with 6 additions and 0 deletions
3
index.d.ts
vendored
3
index.d.ts
vendored
|
|
@ -6,6 +6,9 @@ export type Constructor = (new (...args: Array<any>) => any);
|
|||
|
||||
/** Specify one or more expectations the thrown error must satisfy. */
|
||||
export type ThrowsExpectation = {
|
||||
/** The thrown error must have a code that equals the given string. */
|
||||
code?: string;
|
||||
|
||||
/** The thrown error must be an instance of this constructor. */
|
||||
instanceOf?: Constructor;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ export type Constructor = Class<{constructor(...args: Array<any>): any}>;
|
|||
|
||||
/** Specify one or more expectations the thrown error must satisfy. */
|
||||
export type ThrowsExpectation = {
|
||||
/** The thrown error must have a code that equals the given string. */
|
||||
code?: string;
|
||||
|
||||
/** The thrown error must be an instance of this constructor. */
|
||||
instanceOf?: Constructor;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue