@vitest/runner 3.2.1 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-hooks.js +6 -5
- package/package.json +2 -2
package/dist/chunk-hooks.js
CHANGED
@@ -641,7 +641,7 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
|
|
641
641
|
}
|
642
642
|
if (runner.config.includeTaskLocation) {
|
643
643
|
const error = stackTraceError.stack;
|
644
|
-
const stack = findTestFileStackTrace(error
|
644
|
+
const stack = findTestFileStackTrace(error);
|
645
645
|
if (stack) {
|
646
646
|
task.location = stack;
|
647
647
|
}
|
@@ -714,7 +714,7 @@ function createSuiteCollector(name, factory = () => {}, mode, each, suiteOptions
|
|
714
714
|
Error.stackTraceLimit = 15;
|
715
715
|
const error = new Error("stacktrace").stack;
|
716
716
|
Error.stackTraceLimit = limit;
|
717
|
-
const stack = findTestFileStackTrace(error
|
717
|
+
const stack = findTestFileStackTrace(error);
|
718
718
|
if (stack) {
|
719
719
|
suite.location = stack;
|
720
720
|
}
|
@@ -969,15 +969,16 @@ function formatTemplateString(cases, args) {
|
|
969
969
|
}
|
970
970
|
return res;
|
971
971
|
}
|
972
|
-
function findTestFileStackTrace(error
|
972
|
+
function findTestFileStackTrace(error) {
|
973
|
+
const testFilePath = getTestFilepath();
|
973
974
|
// first line is the error message
|
974
975
|
const lines = error.split("\n").slice(1);
|
975
976
|
for (const line of lines) {
|
976
977
|
const stack = parseSingleStack(line);
|
977
|
-
if (stack && stack.file ===
|
978
|
+
if (stack && stack.file === testFilePath) {
|
978
979
|
return {
|
979
980
|
line: stack.line,
|
980
|
-
column:
|
981
|
+
column: stack.column
|
981
982
|
};
|
982
983
|
}
|
983
984
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/runner",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.2.
|
4
|
+
"version": "3.2.2",
|
5
5
|
"description": "Vitest test runner",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
],
|
40
40
|
"dependencies": {
|
41
41
|
"pathe": "^2.0.3",
|
42
|
-
"@vitest/utils": "3.2.
|
42
|
+
"@vitest/utils": "3.2.2"
|
43
43
|
},
|
44
44
|
"scripts": {
|
45
45
|
"build": "rimraf dist && rollup -c",
|