Skip to content

Commit f2e9632

Browse files
authored
Fixed test run errors due to incorrect sub folder paths in the testExplorer (#1114)
* Fixed test run errors due to incorrect sub folder paths from the test Explorer panel * update release note * remove outdated changelog
1 parent c8a66f9 commit f2e9632

File tree

8 files changed

+21
-448
lines changed

8 files changed

+21
-448
lines changed

Diff for: .vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"node_modules/jest-editor-support/src": false
1010
},
1111
"typescript.tsdk": "./node_modules/typescript/lib",
12+
// jest
13+
"jest.runMode":"on-demand",
14+
// "testing.openTesting": "neverOpen",
1215
// eslint
1316
"tslint.enable": false,
1417
"eslint.enable": true,

Diff for: CHANGELOG.md

-424
This file was deleted.

Diff for: README.md

+1-1
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.2.0](https://github.com/jest-community/vscode-jest/releases/tag/v6.2.0)): [release note](release-notes/release-note-v6.md#v620)
29+
- **Current** ([v6.2.1](https://github.com/jest-community/vscode-jest/releases/tag/v6.2.1)): [release note](release-notes/release-note-v6.md#v621)
3030
- **Previous** ([v5.2.3](https://github.com/jest-community/vscode-jest/releases/tag/v5.2.3)): [release note](release-notes/release-note-v5.x.md#v523)
3131

3232

Diff for: package.json

+1-1
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.2.0",
5+
"version": "6.2.1",
66
"publisher": "Orta",
77
"engines": {
88
"vscode": "^1.68.1"

Diff for: release-notes/release-note-v6.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
Release Notes <!-- omit in toc -->
44
---
55

6+
- [v6.2.1](#v621)
7+
- [CHANGELOG](#changelog)
68
- [v6.2.0](#v620)
79
- [New Features Summary](#new-features-summary)
810
- [Bug Fixes and Technical Debt Reduction](#bug-fixes-and-technical-debt-reduction)
911
- [Breaking Changes](#breaking-changes)
10-
- [CHANGELOG](#changelog)
12+
- [CHANGELOG](#changelog-1)
1113
- [v6.1 (pre-release)](#v61-pre-release)
1214
- [Main Features](#main-features)
1315
- [1. Enhanced Test Execution Control with "runMode"](#1-enhanced-test-execution-control-with-runmode)
@@ -27,10 +29,18 @@ Release Notes <!-- omit in toc -->
2729
- [3. Control extension activation within each folder](#3-control-extension-activation-within-each-folder)
2830
- [4. Auto clear output upon test run](#4-auto-clear-output-upon-test-run)
2931
- [Fixes](#fixes)
30-
- [CHANGELOG](#changelog-1)
32+
- [CHANGELOG](#changelog-2)
3133

3234
---
3335

36+
## v6.2.1
37+
This release is a patch release with the following bug fix:
38+
39+
- Fixed test run errors due to incorrect sub folder paths from the test Explorer panel. ([#1114](https://github.com/jest-community/vscode-jest/pull/1114) - @connectdotz)
40+
41+
### CHANGELOG
42+
- [v6.2.1](https://github.com/jest-community/vscode-jest/releases/tag/v6.2.1)
43+
3444
## v6.2.0
3545
This version is a rollup of pre-releases [v6.0](#v60-pre-release) through [v6.1](#v61-pre-release), which implemented a few long requested features, such as better monorepo project support, more intuitive ways to defer and resume testing, and showing accurate test results in TEST RESULT panel.
3646

Diff for: src/extension-manager.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -529,17 +529,9 @@ export class ExtensionManager {
529529

530530
const ReleaseNoteBase = 'https://github.com/jest-community/vscode-jest/blob/master/release-notes';
531531
const ReleaseNotes: Record<string, string> = {
532+
'6.2.1': `${ReleaseNoteBase}/release-note-v6.md#v621`,
532533
'6.2.0': `${ReleaseNoteBase}/release-note-v6.md#v620`,
533534
'6.1.0': `${ReleaseNoteBase}/release-note-v6.md#v610-pre-release`,
534535
'6.0.0': `${ReleaseNoteBase}/release-note-v6.md#v600-pre-release`,
535536
'5.2.3': `${ReleaseNoteBase}/release-note-v5.x.md#v523`,
536-
'5.2.2': `${ReleaseNoteBase}/release-note-v5.x.md#v522`,
537-
'5.2.1': `${ReleaseNoteBase}/release-note-v5.x.md#v521-pre-release`,
538-
'5.2.0': `${ReleaseNoteBase}/release-note-v5.x.md#v520-pre-release`,
539-
'5.1.0': `${ReleaseNoteBase}/release-note-v5.x.md#v510`,
540-
'5.0.4': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
541-
'5.0.3': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
542-
'5.0.2': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
543-
'5.0.1': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
544-
'5.0.0': `${ReleaseNoteBase}/release-note-v5.md#v50-pre-release-roll-up`,
545537
};

Diff for: src/test-provider/test-item-data.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { JestTestRun } from './jest-test-run';
1414
import { JestProcessInfo, JestProcessRequest } from '../JestProcessManagement';
1515
import { GENERIC_ERROR, LONG_RUNNING_TESTS, getExitErrorDef } from '../errors';
1616
import { tiContextManager } from './test-item-context-manager';
17-
import { toAbsoluteRootPath } from '../helpers';
1817
import { runModeDescription } from '../JestExt/run-mode';
1918
import { isVirtualWorkspaceFolder } from '../virtual-workspace-folder';
2019
import { outputManager } from '../output-manager';
@@ -203,11 +202,7 @@ export class WorkspaceRoot extends TestItemDataBase {
203202
);
204203
};
205204
private addPath = (absoluteFileName: string): FolderData | undefined => {
206-
const absoluteRoot = toAbsoluteRootPath(
207-
this.context.ext.workspace,
208-
this.context.ext.settings.rootPath
209-
);
210-
const relativePath = path.relative(absoluteRoot, absoluteFileName);
205+
const relativePath = path.relative(this.item.uri!.fsPath, absoluteFileName);
211206
const folders = relativePath.split(path.sep).slice(0, -1);
212207

213208
return folders.reduce(this.addFolder, undefined);

Diff for: tests/extension-manager.test.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -1281,11 +1281,8 @@ describe('ExtensionManager', () => {
12811281
});
12821282
it.each`
12831283
case | version | showChoice | choice | showRN
1284-
${1} | ${'4.6'} | ${false} | ${undefined} | ${false}
1285-
${2} | ${'5.0.0'} | ${true} | ${undefined} | ${false}
1286-
${3} | ${'5.0.0'} | ${true} | ${"See What's Changed"} | ${true}
1287-
${4} | ${'5.0.1'} | ${true} | ${undefined} | ${false}
1288-
${5} | ${'6.0.0'} | ${true} | ${undefined} | ${false}
1284+
${2} | ${'6.2.0'} | ${true} | ${undefined} | ${false}
1285+
${3} | ${'6.2.0'} | ${true} | ${"See What's Changed"} | ${true}
12891286
${6} | ${'99.0.0'} | ${false} | ${undefined} | ${false}
12901287
`(
12911288
'show release note once for specific version: case $case',

0 commit comments

Comments
 (0)