Skip to content

Commit

Permalink
fix windows tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Feb 23, 2021
1 parent 96adc49 commit 921adca
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/index.spec.ts
Expand Up @@ -587,8 +587,7 @@ test.suite('ts-node', (test) => {

if (semver.gte(ts.version, '3.2.0')) {
test('--show-config should log resolved configuration', async (t) => {
const rootDirEncoded = JSON.stringify(ROOT_DIR).slice(1, -1)
const rootDirNormalizedEncoded = JSON.stringify(ROOT_DIR.replace(/\\/g, '/')).slice(1, -1)
function normalize (path: string) { return path.replace(/\\/g, '/') }
const { err, stdout } = await exec(`${cmd} --showConfig`)
expect(err).to.equal(null)
t.is(stdout, [
Expand All @@ -599,8 +598,8 @@ test.suite('ts-node', (test) => {
` "noEmit": false,`,
` "strict": true,`,
` "typeRoots": [`,
` "${ rootDirNormalizedEncoded }/tests/typings",`,
` "${ rootDirNormalizedEncoded }/node_modules/@types"`,
` ${ JSON.stringify(normalize(`${ ROOT_DIR }/tests/typings`)) },`,
` ${ JSON.stringify(normalize(`${ ROOT_DIR }/node_modules/@types`)) }`,
` ],`,
` "sourceMap": true,`,
` "inlineSourceMap": false,`,
Expand All @@ -610,9 +609,9 @@ test.suite('ts-node', (test) => {
` "module": "commonjs"`,
` },`,
` "ts-node": {`,
` "cwd": "${ rootDirEncoded }/tests",`,
` "projectSearchDir": "${ rootDirEncoded }/tests",`,
` "project": "${ rootDirEncoded }/tests/tsconfig.json",`,
` "cwd": ${ JSON.stringify(`${ ROOT_DIR }/tests`) },`,
` "projectSearchDir": ${ JSON.stringify(`${ ROOT_DIR }/tests`) },`,
` "project": ${ JSON.stringify(`${ ROOT_DIR }/tests/tsconfig.json`) },`,
` "require": []`,
` }`,
`}`,
Expand Down

0 comments on commit 921adca

Please sign in to comment.