File tree Expand file tree Collapse file tree
packages/vscode-wdio-worker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ import * as t from '@babel/types'
77import recast from 'recast'
88
99const reporterIdentifierName = 'VscodeJsonReporter'
10- const VSCODE_REPORTER_PATH = path . resolve ( __dirname , 'reporter.cjs' )
10+
11+ // This file is bundle as parser/ats.js at the package of vscode-webdriverio
12+ // So, the correct reporter path is parent directory
13+ const VSCODE_REPORTER_PATH = path . resolve ( __dirname , '../reporter.cjs' )
1114/**
1215 * Since Windows cannot import by reporter file path due to issues with
1316 * the `initializePlugin` method of wdio-utils, the policy is to create a temporary configuration file.
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ vi.mock('node:path', async (importOriginal) => {
2626 return {
2727 default : {
2828 ...actual ,
29- resolve : vi . fn ( ( _ , f ) => `/path/to/${f } `) ,
29+ resolve : vi . fn ( ( _ , f ) => actual . resolve ( `/path/to/parser/ ${ f } ` ) ) ,
3030 } ,
3131 }
3232} )
3333
3434describe ( 'config.ts' , ( ) => {
35- const VSCODE_REPORTER_PATH = path . resolve ( __dirname , 'reporter.cjs' )
35+ const VSCODE_REPORTER_PATH = path . resolve ( __dirname , '../ reporter.cjs' )
3636 const reporterPathUrl = pathToFileURL ( VSCODE_REPORTER_PATH ) . href
3737
3838 beforeEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments