Skip to content

Commit

Permalink
Merge branch 'main' into ISSUE-13112-onTestCaseStart-reporter-hook-co…
Browse files Browse the repository at this point in the history
…rrect
  • Loading branch information
SimenB authored Jun 20, 2023
2 parents cbd4a0e + 6460335 commit 26566c9
Show file tree
Hide file tree
Showing 55 changed files with 391 additions and 438 deletions.
4 changes: 2 additions & 2 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

532 changes: 266 additions & 266 deletions .yarn/releases/yarn-3.5.0.cjs → .yarn/releases/yarn-3.5.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
yarnPath: .yarn/releases/yarn-3.5.1.cjs
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<a href="https://github.com/facebook/jest/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Jest is released under the MIT license." />
</a>
<a href="https://twitter.com/intent/follow?screen_name=fbjest">
<img src="https://img.shields.io/twitter/follow/fbjest.svg?style=social&label=Follow%20@fbjest" alt="Follow on Twitter" />
<a href="https://twitter.com/intent/follow?screen_name=jestjs_">
<img src="https://img.shields.io/twitter/follow/jestjs_.svg?style=social&label=Follow%20@jestjs_" alt="Follow on Twitter" />
</a>
</p>
<p align="center">
Expand Down
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ module.exports = config;
import type {Config} from 'jest';

const config: Config = {
setupFilesAfterEnv: ['<rootDir>/setup-matchers.js'],
setupFilesAfterEnv: ['<rootDir>/setup-jest.js'],
};

export default config;
Expand Down
2 changes: 1 addition & 1 deletion docs/MoreResources.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ You will find a number of example test cases in the [`examples`](https://github.

Ask questions and find answers from other Jest users like you. [Reactiflux](https://discord.gg/j6FKKQQrW9) is a Discord chat where a lot of Jest discussion happens. Check out the `#testing` channel.

Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/blog/) to find out what's happening in the world of Jest.
Follow the [Jest Twitter account](https://twitter.com/jestjs_) and [blog](/blog/) to find out what's happening in the world of Jest.
2 changes: 1 addition & 1 deletion e2e/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const linkJestPackage = (packageName: string, cwd: string) => {
};

export const makeTemplate =
(str: string): ((values?: Array<unknown>) => string) =>
(str: string): ((values?: Array<string>) => string) =>
(values = []) =>
str.replace(/\$(\d+)/g, (_match, number) => {
if (!Array.isArray(values)) {
Expand Down
4 changes: 2 additions & 2 deletions e2e/__tests__/__snapshots__/testFailingJasmine.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ FAIL __tests__/worksWithConcurrentMode.test.js
15 | });
16 |
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:176:11)
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:175:11)
at Suite.failing (__tests__/worksWithConcurrentMode.test.js:13:17)
at Object.describe (__tests__/worksWithConcurrentMode.test.js:8:1)
Expand Down Expand Up @@ -80,7 +80,7 @@ FAIL __tests__/worksWithConcurrentOnlyMode.test.js
15 | });
16 |
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:176:11)
at Function.failing (../../packages/jest-jasmine2/build/jasmineAsyncInstall.js:175:11)
at Suite.failing (__tests__/worksWithConcurrentOnlyMode.test.js:13:22)
at Object.describe (__tests__/worksWithConcurrentOnlyMode.test.js:8:1)
Expand Down
4 changes: 2 additions & 2 deletions e2e/coverage-remapping/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ __metadata:

"typescript@patch:typescript@^4.7.3#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=23ec76"
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard
4 changes: 2 additions & 2 deletions e2e/stack-trace-source-maps-with-coverage/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ __metadata:

"typescript@patch:typescript@^4.7.3#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=23ec76"
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard
4 changes: 2 additions & 2 deletions e2e/stack-trace-source-maps/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ __metadata:

"typescript@patch:typescript@^4.7.3#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=23ec76"
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard
4 changes: 2 additions & 2 deletions e2e/typescript-coverage/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ __metadata:

"typescript@patch:typescript@^4.7.3#~builtin<compat/typescript>":
version: 4.9.5
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=23ec76"
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard
2 changes: 1 addition & 1 deletion examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"core-js": "^3.2.1",
"rxjs": "^7.5.5",
"tslib": "^2.0.0",
"typescript": "^4.8.2",
"typescript": "^5.0.4",
"zone.js": "~0.11.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/expect-extend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"babel-jest": "workspace:^",
"expect": "workspace:^",
"jest": "workspace:^",
"typescript": "^4.8.2"
"typescript": "^5.0.4"
},
"scripts": {
"test": "jest"
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"react": "18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.8.2"
"typescript": "^5.0.4"
},
"devDependencies": {
"@babel/core": "^7.11.6",
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"@jest/globals": "workspace:^",
"@jest/test-utils": "workspace:^",
"@lerna-lite/cli": "^1.11.3",
"@microsoft/api-extractor": "^7.33.4",
"@microsoft/api-extractor": "^7.35.0",
"@tsconfig/node14": "^1.0.3",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/babel__core": "^7.1.14",
"@types/babel__generator": "^7.0.0",
"@types/babel__template": "^7.0.2",
Expand Down Expand Up @@ -80,7 +80,7 @@
"strip-json-comments": "^3.1.1",
"tempy": "^1.0.0",
"ts-node": "^10.5.0",
"typescript": "^4.8.2",
"typescript": "^5.0.4",
"which": "^3.0.0"
},
"scripts": {
Expand Down Expand Up @@ -176,10 +176,9 @@
"@types/node": "~14.14.45",
"ansi-escapes/type-fest": "^2.0.0",
"babel-jest": "workspace:^",
"enzyme/cheerio": "=1.0.0-rc.3",
"jest": "workspace:^",
"jest-environment-node": "workspace:^",
"ts-node@^10.5.0": "patch:ts-node@npm:^10.5.0#./.yarn/patches/ts-node-npm-10.9.1-6c268be7f4.patch"
},
"packageManager": "yarn@3.5.0"
"packageManager": "yarn@3.5.1"
}
2 changes: 1 addition & 1 deletion packages/expect-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"jest-get-type": "workspace:^"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"immutable": "^4.0.0",
"jest-matcher-utils": "workspace:^",
"tsd-lite": "^0.7.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"devDependencies": {
"@fast-check/jest": "^1.3.0",
"@jest/test-utils": "workspace:^",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"chalk": "^4.0.0",
"immutable": "^4.0.0",
"tsd-lite": "^0.7.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"yargs": "^17.3.1"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/prompts": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@types/parse-json": "^4.0.0",
"semver": "^7.3.5",
"ts-node": "^10.5.0",
"typescript": "^4.8.2"
"typescript": "^5.0.4"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest-snapshot": "workspace:^"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"tsd-lite": "^0.7.0"
},
"engines": {
Expand Down
1 change: 0 additions & 1 deletion packages/jest-jasmine2/src/jasmineAsyncInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ function promisifyLifeCycleFunction(
// didn't return a promise.
const asyncJestLifecycle = function (done: DoneFn) {
const wrappedFn = isGeneratorFn(fn) ? co.wrap(fn) : fn;
// @ts-expect-error: TS thinks `wrappedFn` is a generator function
const returnValue = wrappedFn.call({}, doneFnNoop);

if (isPromise(returnValue)) {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"jest-util": "workspace:^"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"tsd-lite": "^0.7.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@jest/test-utils": "workspace:^",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/exit": "^0.1.30",
"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-resolve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"slash": "^3.0.0"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/graceful-fs": "^4.1.3",
"@types/pnpapi": "^0.0.2",
"@types/resolve": "^1.20.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"@jest/test-utils": "workspace:^",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/source-map-support": "^0.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@babel/preset-flow": "^7.7.2",
"@babel/preset-react": "^7.12.1",
"@jest/test-utils": "workspace:^",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/babel__core": "^7.1.14",
"@types/graceful-fs": "^4.1.3",
"@types/natural-compare": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"chalk": "^4.0.0"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"tsd-lite": "^0.7.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"@types/merge-stream": "^1.1.2",
"@types/supports-color": "^8.1.0",
"get-stream": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"jest-cli": "workspace:^"
},
"devDependencies": {
"@tsd/typescript": "^4.9.0",
"@tsd/typescript": "^5.0.4",
"tsd-lite": "^0.7.0"
},
"peerDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"esModuleInterop": false,
"isolatedModules": true,
"skipLibCheck": false,
"resolveJsonModule": true
"resolveJsonModule": true,

// TODO: remove for Jest 30
"ignoreDeprecations": "5.0"
}
}
2 changes: 1 addition & 1 deletion website/blog/2017-01-30-a-great-developer-experience.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ As highlighted [last month](/blog/2016/12/15/2016-in-jest), it is now possible t

## Get involved

This is just the start. Go ahead and take a look at the docs, and don't hesitate to send any feedback our way. If you find a mistake in the docs or you just want to let us know what needs to be documented better, please tweet at us at [@fbjest](https://twitter.com/fbjest), [open an issue on GitHub](https://github.com/facebook/jest/issues), or send us a PR by clicking "Edit on GitHub" at the top of the doc.
This is just the start. Go ahead and take a look at the docs, and don't hesitate to send any feedback our way. If you find a mistake in the docs or you just want to let us know what needs to be documented better, please tweet at us at [@jestjs\_](https://twitter.com/jestjs_), [open an issue on GitHub](https://github.com/facebook/jest/issues), or send us a PR by clicking "Edit on GitHub" at the top of the doc.

We're really excited for the year ahead and can't wait to hear from you!
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The homepage was completely redesigned to be more descriptive of what Jest is ab
## Community Updates

- We really loved this talk: “[Introduction to Jest](https://www.youtube.com/watch?v=tvy0bSgwtTo)“ by Vas Boroviak.
- Follow [@fbjest on Twitter](http://twitter.com/fbjest).
- Follow [@jestjs\_ on Twitter](http://twitter.com/jestjs_).
- The Jest Core team syncs once a week to discuss current and future issues. If you'd like to work on Jest, let us know, submit a few pull requests and join our weekly team meetings.
- The awesome engineers at Artsy wrote [about Jest as part of their 2017 frontend stack](http://artsy.github.io/blog/2017/02/05/Front-end-JavaScript-at-Artsy-2017/).
- Stephen Scott wrote a detailed article about [testing React components](https://medium.freecodecamp.com/the-right-way-to-test-react-components-548a4736ab22) in which he weighs the pros and cons of different approaches.
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2018-06-27-supporting-jest-open-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To achieve that goal, we will use the funds to:
- Print and distribute swag
- Develop and fund a bug bounty program (TBD)

This is just the beginning and we're committed to getting this right. If you have ideas on how else we can support the community, or feedback on the structure of the collective, please reach out to us on [twitter](https://twitter.com/fbjest)!
This is just the beginning and we're committed to getting this right. If you have ideas on how else we can support the community, or feedback on the structure of the collective, please reach out to us on [twitter](https://twitter.com/jestjs_)!

## Thank You

Expand Down
4 changes: 2 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ const config = {
},
{
label: 'Twitter',
href: 'https://twitter.com/fbjest',
href: 'https://twitter.com/jestjs_',
},
],
},
Expand All @@ -276,7 +276,7 @@ const config = {
},
{
label: 'Twitter',
href: 'https://twitter.com/fbjest',
href: 'https://twitter.com/jestjs_',
},
],
},
Expand Down
3 changes: 1 addition & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@docusaurus/remark-plugin-npm2yarn": "^2.0.0",
"clsx": "^1.1.1",
"docusaurus-remark-plugin-tab-blocks": "^1.2.0",
"globby": "^11.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-github-btn": "^1.3.0",
Expand All @@ -55,6 +54,6 @@
"graphql": "^16.3.0",
"graphql-request": "^6.0.0",
"js-yaml": "^4.1.0",
"typescript": "^4.8.2"
"typescript": "^5.0.4"
}
}
2 changes: 1 addition & 1 deletion website/src/pages/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Help extends React.Component {
content: (
<Translate>
{`Find out what's new with Jest.
- Follow [Jest](https://twitter.com/fbjest) on Twitter.
- Follow [Jest](https://twitter.com/jestjs_) on Twitter.
- Subscribe to the [Jest blog](/blog/).
- Look at the [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md).`}
</Translate>
Expand Down
Loading

0 comments on commit 26566c9

Please sign in to comment.