Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ts-node eval public for node REPL consumption #1121

Merged
merged 21 commits into from Dec 3, 2020
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/index.spec.ts
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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯

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