From 4ecbcfd7dd76c0b1923a6358347008bb6862da08 Mon Sep 17 00:00:00 2001 From: Jiwon Choi Date: Tue, 18 Jun 2024 23:16:55 +0900 Subject: [PATCH] chore: replace deprecated `jest.autoRun` in `.vscode/settings.json` (#66609) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### 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 --- .vscode/settings.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1b5c4c8a5961d..33e843e966d90 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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": {