73 Commits
Author SHA1 Message Date
addd801b96 feat(jest-mock): add mock.whenCalledWith(...) (#16053)
Co-authored-by: Tim Seckinger <[email protected]>
2026-05-15 10:31:42 +02:00
James IdeandGitHub c46c6b03bc docs: Document getMockImplementation() (#15766) 2025-08-27 12:47:49 +09:00
Simen BekkhusandGitHub 18a522b1e8 chore: avoid spaces in console.log (#14813) 2023-12-30 09:14:14 +00:00
Simen BekkhusandGitHub 41e0be1294 chore: use consistent type imports (#14662) 2023-10-30 13:37:25 +01:00
Simen BekkhusandGitHub a6055e00b3 chore: use numeric separators (#14570) 2023-09-25 21:36:31 +00:00
Simen BekkhusandGitHub a5d2243d53 docs: use caution over danger admonition (#14493) 2023-09-07 15:19:23 +02:00
Sébastien LorberandGitHub b0289017ae Prepare website docs content for MDX v2 and Docusaurus v3 (#14492) 2023-09-07 15:14:32 +02:00
Rob HoganandGitHub 406a22bdec Revert breaking changes to mocks (restoreAllMocks, spy changes) since 29.3.0 (#14429) 2023-08-21 14:02:39 +02:00
Tom MrazauskasandGitHub 93765a50d2 docs: fix a mistake introduced in #13870 (#13872) 2023-02-08 09:18:26 +01:00
c036539e24 docs: few more admonitions for Mock Functions page (#13870)
Co-authored-by: Seong Min Park <[email protected]>
2023-02-07 23:20:39 +01:00
Tom MrazauskasandGitHub 313b63ae10 docs: fix one of mockFn.mockImplementation() TS examples (#13775) 2023-01-17 07:39:03 +01:00
Tom MrazauskasandGitHub 53d0ad023a docs: add "shorthand for" notes in Mock Function API documentation (#13771) 2023-01-15 11:33:08 +01:00
Felipe ou JimmyandGitHub 5e02a7df3a fix: stop changing the behaviour of spies on mockFn.mockReset (#13692) 2023-01-06 17:47:13 +01:00
Michal KočárekandGitHub 03945c598c feat: Allow mocking property value in tests (#13496) 2023-01-04 11:21:38 +01:00
Tom MrazauskasandGitHub c7924c7417 docs: improve TypeScript Usage documentation with few additional notes (#13601) 2022-11-11 13:09:49 +01:00
Tom MrazauskasandGitHub 762fe141aa feat(@jest/globals, jest-mock): add jest.Spied* utility types (#13440) 2022-10-16 15:55:21 +02:00
Tom MrazauskasandGitHub 7db123ef07 chore(lint): use jest/no-alias-methods rule (#13371) 2022-10-03 17:00:53 +02:00
Jesper SørensenandGitHub 0276438dbd feat(@jest/mock): Add withImplementation (#13281) 2022-09-23 16:16:53 +02:00
Tom MrazauskasandGitHub 21d01d9373 docs: use 'shorthand' definition instead of 'syntactic sugar' (#13271) 2022-09-17 09:35:04 +02:00
Tom MrazauskasandGitHub cfcaefb69d docs: fix error printout in .mockName() example (#12913) 2022-09-14 12:22:08 +02:00
Tom MrazauskasandGitHub 6425ca7c4d feat(@jest/globals): add jest.Mock type helper (#13235) 2022-09-10 01:10:13 +02:00
Jonathan XiandGitHub 2d8a202543 Update MockFunctionAPI.md to correct link text (#12930) 2022-09-07 12:44:04 +02:00
Tom MrazauskasandGitHub b4add8fdd4 docs: use TypeScript Examples Note partial (#13212) 2022-09-06 00:09:13 +02:00
Tom MrazauskasandGitHub 19fbb3b6fb refactor(jest-mock)!: change the default jest.mocked helper’s behaviour to deep mocked (#13125) 2022-08-13 12:50:16 +02:00
Tom MrazauskasandGitHub c701f96735 feat(@jest/globals): add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types (#12727) 2022-08-12 23:48:22 +02:00
Jake BooneandGitHub c112516e7a docs: minor grammar correction from "as document" to "as documented" (#12995) 2022-07-07 10:10:16 +02:00
Christopher AllenandGitHub 2a815c5377 fix typo/punctuation in MockFunctionAPI.md (#12887)
* fix typo/punctuation in MockFunctionAPI.md

* fix typo/punctuation in docs/MockFunctionAPI.md

* fix typo/punctuation in v28.0/MockFunctionAPI.md
2022-06-03 10:27:52 +02:00
Tom MrazauskasandGitHub c26b4fcae6 docs: use docusaurus-remark-plugin-tab-blocks to format tabs with code examples (#12859) 2022-05-31 08:25:11 +02:00
MatthiasandGitHub b37c703b42 Add contexts to mocks (#12601) 2022-03-29 10:05:48 +02:00
Simen Bekkhus 8eadcce3cc chore: format docs as MDX 2022-03-05 09:34:56 +01:00
Simen BekkhusandGitHub 2c8c8aea85 chore: update docusaurus (#12500) 2022-03-05 09:34:38 +01:00
Tom MrazauskasandGitHub 3af1e6c15d docs: fix one TypeScript example in Mock Functions documentation (#12520) 2022-03-01 08:07:26 +01:00
Tom MrazauskasandGitHub 5d15ff6a25 refactor(jest-mock)!: simplify usage of jest.fn generic type arguments (#12489) 2022-02-26 19:39:26 +01:00
BIKI DASandGitHub ee89972d9f feat(jest-mock): add mockFn.mock.lastCall to retrieve last argument (#12285) 2022-02-05 08:36:43 +01:00
mrazauskasandGitHub f6b269d780 fix(cli, config, docs): improve mock related cli messages, config template entries and documentation (#12047) 2021-11-29 14:10:03 +01:00
BIKI DASandGitHub d01a135b7e Correcting mockClear api docs (#12019) 2021-11-02 20:49:29 +01:00
Joshua ChenandGitHub 3592f6a331 docs: move codeblock title to props & use line highlight (#11991) 2021-10-24 10:01:50 +02:00
Simen Bekkhus d43948e954 chore: fix typo in docs
This is mostly to trigger a deploy of the site
2021-09-13 10:58:27 +02:00
RickyandGitHub 8ef6ef0f0e Rename all links to main (#11856) 2021-09-08 16:01:42 -04:00
Simen BekkhusandGitHub 2e992e522d chore: update website links to avoid redirects (#11256) 2021-04-02 09:21:47 +02:00
Sébastien LorberandGitHub 705fbd7e3e Jest Website v2 (#11149) 2021-03-11 17:57:06 +01:00
Chris ShepherdandGitHub c6af6f9714 Add docs for using mocks in TypeScript (#10415) 2020-10-29 14:31:20 +01:00
Mahfoudh ArousandGitHub bb75c3dac0 fixing few typos and enhancing clarity in few sentences, in docs (#10296) 2020-07-23 07:39:43 +02:00
Simen BekkhusandGitHub 10c1340ba0 chore: update to prettier@2 (#9692) 2020-03-23 20:56:37 +01:00
BogdanandTim Seckinger bc394925bd Docs: fix broken anchor links (#9247)
* Docs: fix broken anchor links

* Docs: fix links from Configuration.md
2019-12-01 17:45:16 +00:00
Simen BekkhusandGitHub ce9298cd39 chore: bump prettier (#9153) 2019-11-09 11:04:54 +01:00
Carolyn StranskyandChristoph Nakazawa 7272c997c5 Docs: Removed condescending language (#9040)
* Round 1 - simply, just

* Round 2 - easy, easily, of course, simple
2019-10-11 15:53:50 +09:00
Michael WeibelandTim Seckinger dfd05585d6 docs: update reported error text (#8533)
this matches more what is being reported. Especially the bit about `"mockedFunction"` is important, because otherwise it's a bit confusing what `mockName` will help with.
2019-06-06 15:41:09 +02:00
Brian SaylerandSimen Bekkhus e1ddcd021c Grammar correction in Mock Function docs (#8399) 2019-05-03 08:40:42 +02:00
Morgan McCollumandSimen Bekkhus 37305aa352 Simple sugar text correction in Mock Function docs (#8406) 2019-05-02 19:28:25 +02:00