Skip to content

Commit

Permalink
test: fix "Extension Tests (current file)" task on Windows #1057
Browse files Browse the repository at this point in the history
Handle backslashes.
  • Loading branch information
justinmk3 authored Apr 29, 2020
1 parent 2f6ac1c commit bd74d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third-party/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function run(testsRoot, clb): any {
// 2020-03-24: Amazon addition.
// VSCode refuses to unset this value, so it gets set for each task and null is converted to a string
const testFile = process.env["TEST_FILE"] === 'null' ? undefined : process.env["TEST_FILE"]
const testFilePath = testFile?.replace(/^src\/test\//, "")?.concat('.js')
const testFilePath = testFile?.replace(/^src[\\\/]test[\\\/]/, '')?.concat('.js')

const globalSetupPath = paths.join(testsRoot, 'globalSetup.test.js')
if (testFilePath && fs.existsSync(globalSetupPath)) {
Expand Down

0 comments on commit bd74d2f

Please sign in to comment.