-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jest-console typings and convert DateTimePicker tests to TypeScri…
…pt (#40957) * Convert DateTimePicker tests to TypeScript * Use correct return type * Use typings from DefinitelyTyped * Update CHANGELOG.md files * Add attribution
- Loading branch information
1 parent
15b211a
commit 9120449
Showing
9 changed files
with
90 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Definitions originally written by Damien Sorel <https://github.com/mistic100> under MIT license. | ||
// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/f0b72c12f6b561e4342dc8a1cf87432d2ad40ae7/types/wordpress__jest-console/index.d.ts | ||
|
||
declare namespace jest { | ||
interface Matchers< R, T > { | ||
/** | ||
* Ensure that `console.error` function was called. | ||
*/ | ||
toHaveErrored(): R; | ||
|
||
/** | ||
* Ensure that `console.error` function was called with specific arguments. | ||
*/ | ||
toHaveErroredWith( ...args: any[] ): R; | ||
|
||
/** | ||
* Ensure that `console.info` function was called. | ||
*/ | ||
toHaveInformed(): R; | ||
|
||
/** | ||
* Ensure that `console.info` function was called with specific arguments. | ||
*/ | ||
toHaveInformedWith( ...args: any[] ): R; | ||
|
||
/** | ||
* Ensure that `console.log` function was called. | ||
*/ | ||
toHaveLogged(): R; | ||
|
||
/** | ||
* Ensure that `console.log` function was called with specific arguments. | ||
*/ | ||
toHaveLoggedWith( ...args: any[] ): R; | ||
|
||
/** | ||
* Ensure that `console.warn` function was called. | ||
*/ | ||
toHaveWarned(): R; | ||
|
||
/** | ||
* Ensure that `console.warn` function was called with specific arguments. | ||
*/ | ||
toHaveWarnedWith( ...args: any[] ): R; | ||
} | ||
} |