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

feat(node): add polyfill for node:test module #20002

Merged
merged 13 commits into from
Aug 1, 2023

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Jul 31, 2023

This commit provides basic polyfill for "node:test" module. Currently only
top-level "test" function is polyfilled, all remaining functions from that module
throw not implemented errors.

@bartlomieju bartlomieju removed the request for review from dsherret August 1, 2023 00:16
@bartlomieju bartlomieju marked this pull request as draft August 1, 2023 00:17
@bartlomieju bartlomieju marked this pull request as ready for review August 1, 2023 12:10
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM!

cli/tests/testdata/node/test.out Outdated Show resolved Hide resolved
async throw fail => node:test:135:10
async skip fail => node:test:135:10
async assertion fail => node:test:135:10
reject fail => node:test:135:10
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should wildcard these line numbers?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd rather not - they show a problem that the current implementation doesn't point to proper place - all point to a wrapper function in ext/node/polyfills/testing.ts module. I think I know how to fix it in the implementation of Deno.test but I want to do it in a follow up.

@bartlomieju bartlomieju merged commit 21f1b2f into denoland:main Aug 1, 2023
13 checks passed
@bartlomieju bartlomieju deleted the node_test branch August 1, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants