File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/vitest-plugin/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ import { Benchmark, Suite } from "vitest";
11
11
import { NodeBenchmarkRunner } from "vitest/runners" ;
12
12
import { getBenchFn } from "vitest/suite" ;
13
13
14
+ const currentFileName =
15
+ typeof __filename === "string"
16
+ ? __filename
17
+ : new URL ( "runner.mjs" , import . meta. url ) . pathname ;
18
+
14
19
/**
15
20
* @deprecated
16
21
* TODO: try to use something like `updateTask` from `@vitest/runner` instead to use the output
@@ -67,7 +72,7 @@ function patchRootSuiteWithFullFilePath(suite: Suite) {
67
72
68
73
class CodSpeedRunner extends NodeBenchmarkRunner {
69
74
async runSuite ( suite : Suite ) : Promise < void > {
70
- logDebug ( `PROCESS PID: ${ process . pid } in ${ __filename } ` ) ;
75
+ logDebug ( `PROCESS PID: ${ process . pid } in ${ currentFileName } ` ) ;
71
76
setupCore ( ) ;
72
77
73
78
patchRootSuiteWithFullFilePath ( suite ) ;
You can’t perform that action at this time.
0 commit comments