Skip to content

Commit 79efc82

Browse files
authored
update jest 30 error detecton - auto switch jest30 (#1254)
* updatee jest 30 error regex so the extension can detect jest 30 and auto setting useJest30 accordingly. * prepare for release 6.4.4
1 parent d1a3597 commit 79efc82

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ You can see the full [features](#features) and learn more details in the [How-To
2626
Happy testing!
2727

2828
## Releases
29-
- **Current** ([v6.4.3](https://github.com/jest-community/vscode-jest/releases/tag/v6.4.3)): [release note](release-notes/release-note-v6.md#v643)
29+
- **Current** ([v6.4.4](https://github.com/jest-community/vscode-jest/releases/tag/v6.4.4)): [release note](release-notes/release-note-v6.md#v644)
3030
- **Previous** ([v6.4.0](https://github.com/jest-community/vscode-jest/releases/tag/v6.4.0)): [release note](release-notes/release-note-v6.md#v640)
3131

3232

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-jest",
33
"displayName": "Jest",
44
"description": "Use Facebook's Jest With Pleasure.",
5-
"version": "6.4.3",
5+
"version": "6.4.4",
66
"publisher": "Orta",
77
"engines": {
88
"vscode": "^1.88.1"

release-notes/release-note-v6.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Release Notes <!-- omit in toc -->
44
---
55

6+
- [v6.4.4](#v644)
7+
- [Fixes](#fixes)
68
- [v6.4.3](#v643)
79
- [Bug Fixes](#bug-fixes)
810
- [Other Changes](#other-changes)
@@ -51,11 +53,23 @@ Release Notes <!-- omit in toc -->
5153
- [2. Support spawning jest with dashed arguments](#2-support-spawning-jest-with-dashed-arguments)
5254
- [3. Control extension activation within each folder](#3-control-extension-activation-within-each-folder)
5355
- [4. Auto clear output upon test run](#4-auto-clear-output-upon-test-run)
54-
- [Fixes](#fixes)
56+
- [Fixes](#fixes-1)
5557
- [CHANGELOG](#changelog-3)
5658

5759
---
5860

61+
## v6.4.4
62+
63+
This release is a minor bug fix to auto switch jest30 settings.
64+
65+
### Fixes
66+
- Fixed jest 30 error detection so the system can auto switch to jest30 settings when the error is detected. ([#1254](https://github.com/jest-community/vscode-jest/pull/1254) by @connectdotz).
67+
- fix syntax in README.md. ([#1243](https://github.com/jest-community/vscode-jest/pull/1243) by @qqii)
68+
69+
**CHANGELOG**
70+
71+
* [v6.4.4](https://github.com/jest-community/vscode-jest/releases/tag/v6.4.4)
72+
5973
## v6.4.3
6074

6175
This release is a roll-up of the v6.4.1 and v6.4.2 pre-releases, consolidating several bug fixes.

src/JestExt/process-listeners.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const POSSIBLE_ENV_ERROR_REGEX =
1414
/^(((?!(jest|react-scripts)).)*)(command not found|no such file or directory)/im;
1515

1616
const TEST_PATH_PATTERNS_V30_ERROR_REGEX =
17-
/Option "testPathPattern" was replaced by "testPathPatterns"\./i;
17+
/Option "testPathPattern" was replaced by "--testPathPatterns"\./i;
1818
const TEST_PATH_PATTERNS_NOT_V30_ERROR_REGEX =
1919
/Unrecognized option "testPathPatterns". Did you mean "testPathPattern"\?/i;
2020
export class AbstractProcessListener {

src/extension-manager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ export class ExtensionManager {
524524

525525
const ReleaseNoteBase = 'https://github.com/jest-community/vscode-jest/blob/master/release-notes';
526526
const ReleaseNotes: Record<string, string> = {
527+
'6.4.4': `${ReleaseNoteBase}/release-note-v6.md#v644`,
527528
'6.4.3': `${ReleaseNoteBase}/release-note-v6.md#v643`,
528529
'6.4.2': `${ReleaseNoteBase}/release-note-v6.md#v642-pre-release`,
529530
'6.4.1': `${ReleaseNoteBase}/release-note-v6.md#v641-pre-release`,

tests/JestExt/process-listeners.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ describe('jest process listeners', () => {
580580
describe('jest 30 support', () => {
581581
describe('can restart process if detected jest 30 related error', () => {
582582
it.each`
583-
case | output | useJest30Before | useJest30After | willRestart
584-
${1} | ${'Error in JestTestPatterns'} | ${null} | ${null} | ${false}
585-
${2} | ${'Error in JestTestPatterns'} | ${true} | ${true} | ${false}
586-
${3} | ${'Process Failed\nOption "testPathPattern" was replaced by "testPathPatterns".'} | ${null} | ${true} | ${true}
587-
${4} | ${'Process Failed\nOption "testPathPattern" was replaced by "testPathPatterns".'} | ${false} | ${true} | ${true}
583+
case | output | useJest30Before | useJest30After | willRestart
584+
${1} | ${'Error in JestTestPatterns'} | ${null} | ${null} | ${false}
585+
${2} | ${'Error in JestTestPatterns'} | ${true} | ${true} | ${false}
586+
${3} | ${'Process Failed\nOption "testPathPattern" was replaced by "--testPathPatterns".'} | ${null} | ${true} | ${true}
587+
${4} | ${'Process Failed\nOption "testPathPattern" was replaced by "--testPathPatterns".'} | ${false} | ${true} | ${true}
588588
`('case $case', ({ output, useJest30Before, useJest30After, willRestart }) => {
589589
expect.hasAssertions();
590590
mockSession.context.settings.useJest30 = useJest30Before;

0 commit comments

Comments
 (0)