kevin940726 / console-testing-library

📝 Testing console the right way
MIT License
4 stars 4 forks source link

[Feature] Expose stdout and stderr #13

Closed nulltoken closed 3 years ago

nulltoken commented 3 years ago

:wave: @kevin940726

Would you be open to tweak TestingConsoleInstance so that it exposes stderr and stdout string properties?

stdout would be valued by invocations leveraging log and info, and stderr by warn and error.

kevin940726 commented 3 years ago

I wonder if stderr and stdout are valid concepts in browser environment? I recall that it's the reason I don't want to expose those in the first place. But again, I don't think exposing them to Node environment only would be a bad idea. PR welcome!

nulltoken commented 3 years ago

I wonder if stderr and stdout are valid concepts in browser environment?

I indeed didn't think of the browser environment with regards to that proposal. Would that be blocking?

kevin940726 commented 3 years ago

No I don't think it would be blocking. Just that it won't be relevant in browser environment, and we need proper documentation :).