-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
test: collect stdout/stderr in tests #3615
Conversation
9944c31
to
fdcf9cc
Compare
require('../../..'); | ||
|
||
it('stdio', () => { | ||
process.stdout.write('stdout text'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with console logs? I'm scared about our method of overwriting process.stdout.write.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, i'm adding a test.
process.stdout.write('stdout text'); | ||
process.stdout.write(Buffer.from('stdout buffer')); | ||
process.stderr.write('stderr text'); | ||
process.stderr.write(Buffer.from('stderr buffer')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.stderr.write(Buffer.from('stderr buffer')); | |
process.stderr.write(Buffer.from('stderr buffer')); | |
console.log('console log'); | |
console.error('console.error'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, added a separate test!
ec2dbd5
to
ce08eab
Compare
ce08eab
to
841b815
Compare
No description provided.