Skip to content

fix(ext/node): add basic support of suite/describe in node:test #28847

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

Merged
merged 4 commits into from
Apr 14, 2025

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented Apr 11, 2025

This PR adds basic support of suite/describe in node:test

closes #27406

towards #28837

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

LGTM

it.only = function only(name, options, fn) {
return test.only(name, options, fn);
};

Copy link
Member

Choose a reason for hiding this comment

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

Can you add these lines?

test.test = test;
test.describe = describe;
test.it = it;

This will make this module more in-line with Node's implementation

});

describe("sub describe 2", () => {
it("nested test 1", () => {});
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to have failing test cases here to ensure errors are properly caught and reported

@kt3k kt3k merged commit 1dfd444 into denoland:main Apr 14, 2025
18 checks passed
@kt3k kt3k deleted the fix-ext-node-support-test-suite branch April 14, 2025 06:44
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.

test.describe not implemented
3 participants