-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
feat(jupyter): support Deno.test() #20778
Conversation
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.
There's quite a few moving parts here - would you be able to split this PR into two separate PRs so that if something goes wrong we can revert them in bite-sized chunks? I believe the refactor or tools/test
to accept writer argument could be a standalone PR which would be a nice cleanup anyway. Would you be able to update cli/tests/testdata/jupyter/integration_tests.ipynb
to include a cell that runs a test?
I am so excited about this because now we can give tutorials on writing tests within a notebook. 👨🏻🍳💋 |
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.
Overall looks good, nearly there. I have one question regarding output capture
ops::jupyter::deno_jupyter::init_ops(stdio_tx.clone()), | ||
crate::ops::testing::deno_test::init_ops(test_event_sender.clone()), | ||
], | ||
// FIXME(nayeemrmn): Test output capturing currently doesn't work. |
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.
Hm, shouldn't we be able to capture the test output the same way deno test
does it? Isn't it a matter of forwarding it to a proper channel?
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 causes all logged output in the repl to be buffered and then flushed to stdout at once when a test event is processed.
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.
LGTM, let's try to address the capturing soon
Blocked by #20783.