Skip to content

Commit

Permalink
Tweak repl API test to match REPL CLI test, allowing it to pass on Wi…
Browse files Browse the repository at this point in the history
…ndows
  • Loading branch information
cspotcode committed Dec 3, 2020
1 parent 354cb10 commit 7f1a7a2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,15 @@ describe('ts-node', function () {
const service = create(replService.evalAwarePartialHost)
replService.setService(service)
replService.start()
stdin.write(
'const a = 123\n' +
'.type a\n'
)
stdin.write('\nconst a = 123\n.type a\n')
stdin.end()
await promisify(setTimeout)(100)
await promisify(setTimeout)(1e3)
stdout.end()
stderr.end()
expect(await getStream(stderr)).to.equal('')
expect(await getStream(stdout)).to.equal(
'> \'use strict\'\n' +
'> undefined\n' +
'> const a: 123\n' +
'> '
)
Expand Down

0 comments on commit 7f1a7a2

Please sign in to comment.