Skip to content

Commit

Permalink
chore: replace deprecated jest.autoRun in .vscode/settings.json (v…
Browse files Browse the repository at this point in the history
…ercel#66609)

### Why?

![Screenshot 2024-06-07 at 2 22
00 AM](https://github.com/vercel/next.js/assets/120007119/61334227-afac-4221-ade7-0b0bb653cee0)

Since `jest.autoRun` in `.vscode/settings.json` is deprecated, this PR
replaces it with an equivalent setting using the recommended migration
guide.

> Starting from v6.1.0, if no runMode is defined in settings.json, the
extension will automatically generate one using legacy settings
(autoRun, showCoverageOnLoad). To migrate, simply use the "Jest: Save
Current RunMode" command from the command palette to update the setting,
then remove the deprecated settings.

x-ref:
https://github.com/jest-community/vscode-jest/blob/master/README.md#autorun
  • Loading branch information
devjiwonchoi committed Jun 18, 2024
1 parent 55eea1c commit 4ecbcfd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
"typescript",
"typescriptreact"
],
// Disable Jest autoRun as otherwise it will start running all tests the first time.
"jest.autoRun": "off",
// Set Jest runMode to on-demand as otherwise it will start running all tests the first time.
// Equivalent to deprecated option "jest.autoRun": "off"
"jest.runMode": "on-demand",
// Debugging.
"debug.javascript.unmapMissingSources": true,
"files.exclude": {
Expand Down

0 comments on commit 4ecbcfd

Please sign in to comment.