Skip to content

Commit 73a4051

Browse files
committed
Merge branch 'main' of github.com:jestjs/jest into 15189-replace-chalk-with-picocolors
2 parents 51baa3e + b0eb836 commit 73a4051

File tree

101 files changed

+1261
-1386
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1261
-1386
lines changed

.yarn/releases/yarn-3.8.4.cjs renamed to .yarn/releases/yarn-3.8.5.cjs

Lines changed: 197 additions & 197 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ plugins:
3333
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
3434
spec: "@yarnpkg/plugin-workspace-tools"
3535

36-
yarnPath: .yarn/releases/yarn-3.8.4.cjs
36+
yarnPath: .yarn/releases/yarn-3.8.5.cjs

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
- `[@jest/expect-utils]` Fix not addressing to Sets and Maps as objects without keys ([#14873](https://github.com/jestjs/jest/pull/14873))
7676
- `[jest-leak-detector]` Make leak-detector more aggressive when running GC ([#14526](https://github.com/jestjs/jest/pull/14526))
7777
- `[jest-runtime]` Properly handle re-exported native modules in ESM via CJS ([#14589](https://github.com/jestjs/jest/pull/14589))
78+
- `[jest-schemas, jest-types]` [**BREAKING**] Fix type of `testFailureExitCode` config option([#15232](https://github.com/jestjs/jest/pull/15232))
7879
- `[jest-util]` Make sure `isInteractive` works in a browser ([#14552](https://github.com/jestjs/jest/pull/14552))
7980
- `[pretty-format]` [**BREAKING**] Print `ArrayBuffer` and `DataView` correctly ([#14290](https://github.com/jestjs/jest/pull/14290))
8081
- `[pretty-format]` Fixed a bug where "anonymous custom elements" were not being printed as expected. ([#15138](https://github.com/jestjs/jest/pull/15138))
@@ -118,6 +119,7 @@
118119
- `[docs]` Updated `.toHaveBeenCalled()` documentation to correctly reflect its functionality ([#14842](https://github.com/jestjs/jest/pull/14842))
119120
- `[docs]` Link NestJS documentation on testing with Jest ([#14940](https://github.com/jestjs/jest/pull/14940))
120121
- `[docs]` `Revised documentation for .toHaveBeenCalled()` to accurately depict its functionality. ([#14853](https://github.com/jestjs/jest/pull/14853))
122+
- `[docs]` Removed ExpressJS reference link from documentation due to dead link ([#15270](https://github.com/jestjs/jest/pull/15270))
121123

122124
## 29.7.0
123125

docs/CLI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ jest --seed=1324
407407

408408
If this option is not specified Jest will randomly generate the value. You can use the [`--showSeed`](#--showseed) flag to print the seed in the test report summary.
409409

410+
Jest uses the seed internally for shuffling the order in which test suites are run. If the [`--randomize`](#--randomize) option is used, the seed is also used for shuffling the order of tests within each `describe` block. When dealing with flaky tests, rerunning with the same seed might help reproduce the failure.
411+
410412
:::
411413

412414
### `--selectProjects <project1> ... <projectN>`

docs/GlobalAPI.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Use `describe.each` if you keep duplicating the same test suites with different
251251
- `%$` - Number of the test case.
252252
- `%%` - single percent sign ('%'). This does not consume an argument.
253253
- Or generate unique test titles by injecting properties of test case object with `$variable`
254-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
254+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
255255
- You can use `$#` to inject the index of the test case
256256
- You cannot use `$variable` with the `printf` formatting except for `%%`
257257
- `fn`: `Function` the suite of tests to be run, this is the function that will receive the parameters in each row as function arguments.
@@ -305,7 +305,7 @@ describe.each([
305305
- First row of variable name column headings separated with `|`
306306
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
307307
- `name`: `String` the title of the test suite, use `$variable` to inject test data into the suite title from the tagged template expressions, and `$#` for the index of the row.
308-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
308+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
309309
- `fn`: `Function` the suite of tests to be run, this is the function that will receive the test data object.
310310
- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. The default timeout is 5 seconds.
311311

@@ -574,7 +574,7 @@ test.concurrent.each([
574574
- First row of variable name column headings separated with `|`
575575
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
576576
- `name`: `String` the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions.
577-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
577+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
578578
- `fn`: `Function` the test to be run, this is the function that will receive the test data object, **this will have to be an asynchronous function**.
579579
- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. The default timeout is 5 seconds.
580580

@@ -697,7 +697,7 @@ Use `test.each` if you keep duplicating the same test with different data. `test
697697
- `%$` - Number of the test case.
698698
- `%%` - single percent sign ('%'). This does not consume an argument.
699699
- Or generate unique test titles by injecting properties of test case object with `$variable`
700-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
700+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
701701
- You can use `$#` to inject the index of the test case
702702
- You cannot use `$variable` with the `printf` formatting except for `%%`
703703
- `fn`: `Function` the test to be run, this is the function that will receive the parameters in each row as function arguments.
@@ -731,7 +731,7 @@ test.each([
731731
- First row of variable name column headings separated with `|`
732732
- One or more subsequent rows of data supplied as template literal expressions using `${value}` syntax.
733733
- `name`: `String` the title of the test, use `$variable` to inject test data into the test title from the tagged template expressions.
734-
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value`
734+
- To inject nested object values use you can supply a keyPath i.e. `$variable.path.to.value` (only works for ["own" properites](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty), e.g. `$variable.constructor.name` wouldn't work)
735735
- `fn`: `Function` the test to be run, this is the function that will receive the test data object.
736736
- Optionally, you can provide a `timeout` (in milliseconds) for specifying how long to wait for each row before aborting. The default timeout is 5 seconds.
737737

docs/TestingFrameworks.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ Jest is a universal testing platform, with the ability to adapt to any JavaScrip
3232

3333
- [Writing Tests](https://redux.js.org/recipes/writing-tests) by Redux docs
3434

35-
## Express.js
36-
37-
- [How to test Express.js with Jest and Supertest](http://www.albertgao.xyz/2017/05/24/how-to-test-expressjs-with-jest-and-supertest/) by Albert Gao ([@albertgao](https://twitter.com/albertgao))
38-
3935
## GatsbyJS
4036

4137
- [Unit Testing](https://www.gatsbyjs.org/docs/unit-testing/) by GatsbyJS docs

docs/Troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Retry with [`--no-cache`](CLI.md#--cache). Jest caches transformed module files
142142
If a promise doesn't resolve at all, this error might be thrown:
143143

144144
```bash
145-
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.`
145+
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
146146
```
147147

148148
Most commonly this is being caused by conflicting Promise implementations. Consider replacing the global promise implementation with your own, for example `globalThis.Promise = jest.requireActual('promise');` and/or consolidate the used Promise libraries to a single one.

e2e/__tests__/__snapshots__/console.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,22 @@ exports[`does not error out when using winston 2`] = `
108108
console.log
109109
{"level":"info","message":"Log message from winston"}
110110
111-
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
111+
at Console.log (node_modules/winston/lib/winston/transports/console.js:87:23)
112112
113113
console.log
114114
{"level":"info","message":"Info message from winston"}
115115
116-
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
116+
at Console.log (node_modules/winston/lib/winston/transports/console.js:87:23)
117117
118118
console.log
119119
{"level":"warn","message":"Warn message from winston"}
120120
121-
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)
121+
at Console.log (node_modules/winston/lib/winston/transports/console.js:87:23)
122122
123123
console.log
124124
{"level":"error","message":"Error message from winston"}
125125
126-
at Console.log (node_modules/winston/lib/winston/transports/console.js:79:23)"
126+
at Console.log (node_modules/winston/lib/winston/transports/console.js:87:23)"
127127
`;
128128
129129
exports[`does not error out when using winston 3`] = `

e2e/async-regenerator/yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,9 @@ __metadata:
366366
linkType: hard
367367

368368
"caniuse-lite@npm:^1.0.30001646":
369-
version: 1.0.30001647
370-
resolution: "caniuse-lite@npm:1.0.30001647"
371-
checksum: 4c2a32cf51a6328e263b4b4f59118be88b168215727258d41cc1db309c8987cd86fecacb3237b6886ee00f0d6b98e5321a5a4009a93cad2420e87f251e79e679
369+
version: 1.0.30001651
370+
resolution: "caniuse-lite@npm:1.0.30001651"
371+
checksum: c31a5a01288e70cdbbfb5cd94af3df02f295791673173b8ce6d6a16db4394a6999197d44190be5a6ff06b8c2c7d2047e94dfd5e5eb4c103ab000fca2d370afc7
372372
languageName: node
373373
linkType: hard
374374

@@ -428,9 +428,9 @@ __metadata:
428428
linkType: hard
429429

430430
"electron-to-chromium@npm:^1.5.4":
431-
version: 1.5.4
432-
resolution: "electron-to-chromium@npm:1.5.4"
433-
checksum: 352f13c043cb185b464efe20f9b0a1adea2b1a7dad56e41dac995d0ad060f9981e479d632ebc73a1dce3bd5c36bbceeffe0667161ce296c2488fbb95f89bc793
431+
version: 1.5.11
432+
resolution: "electron-to-chromium@npm:1.5.11"
433+
checksum: 9dbf480ff39005b3c9657e6b8df534a4597d0747472f2982315cc169024ebfb45f99b16dd57d8be4a51a063f14590f9f585f179e55f68591f870f38b9a5e491a
434434
languageName: node
435435
linkType: hard
436436

e2e/babel-plugin-jest-hoist/yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,9 +1467,9 @@ __metadata:
14671467
linkType: hard
14681468

14691469
"caniuse-lite@npm:^1.0.30001646":
1470-
version: 1.0.30001647
1471-
resolution: "caniuse-lite@npm:1.0.30001647"
1472-
checksum: 4c2a32cf51a6328e263b4b4f59118be88b168215727258d41cc1db309c8987cd86fecacb3237b6886ee00f0d6b98e5321a5a4009a93cad2420e87f251e79e679
1470+
version: 1.0.30001651
1471+
resolution: "caniuse-lite@npm:1.0.30001651"
1472+
checksum: c31a5a01288e70cdbbfb5cd94af3df02f295791673173b8ce6d6a16db4394a6999197d44190be5a6ff06b8c2c7d2047e94dfd5e5eb4c103ab000fca2d370afc7
14731473
languageName: node
14741474
linkType: hard
14751475

@@ -1522,9 +1522,9 @@ __metadata:
15221522
linkType: hard
15231523

15241524
"electron-to-chromium@npm:^1.5.4":
1525-
version: 1.5.4
1526-
resolution: "electron-to-chromium@npm:1.5.4"
1527-
checksum: 352f13c043cb185b464efe20f9b0a1adea2b1a7dad56e41dac995d0ad060f9981e479d632ebc73a1dce3bd5c36bbceeffe0667161ce296c2488fbb95f89bc793
1525+
version: 1.5.11
1526+
resolution: "electron-to-chromium@npm:1.5.11"
1527+
checksum: 9dbf480ff39005b3c9657e6b8df534a4597d0747472f2982315cc169024ebfb45f99b16dd57d8be4a51a063f14590f9f585f179e55f68591f870f38b9a5e491a
15281528
languageName: node
15291529
linkType: hard
15301530

0 commit comments

Comments
 (0)