Skip to content

Commit

Permalink
add failing test for #1004
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Apr 12, 2020
1 parent 2a0f1f3 commit 5a316c9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.spec.ts
Expand Up @@ -379,6 +379,14 @@ describe('ts-node', function () {
expect(err).to.equal(null)
expect(stdout).to.equal('.ts\n')

return done()
})
})
it('should read tsconfig relative to realpath, not symlink, in scriptMode', function (done) {
exec(`node ${BIN_SCRIPT_PATH} tests/main-realpath/symlink/symlink.ts`, function (err, stdout) {
expect(err).to.equal(null)
expect(stdout).to.equal('')

return done()
})
})
Expand Down
1 change: 1 addition & 0 deletions tests/main-realpath/symlink/symlink.ts
1 change: 1 addition & 0 deletions tests/main-realpath/symlink/tsconfig.json
@@ -0,0 +1 @@
this tsconfig is intentionally invalid, to confirm that ts-node does *not* attempt to parse it
2 changes: 2 additions & 0 deletions tests/main-realpath/target/index.ts
@@ -0,0 +1,2 @@
// Will throw a compiler error unless ./tsconfig.json is parsed, which enables downlevelIteration
for(const b of new Set()) {}
5 changes: 5 additions & 0 deletions tests/main-realpath/target/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"downlevelIteration": true
}
}

0 comments on commit 5a316c9

Please sign in to comment.