diff --git a/ext/node/polyfills/testing.ts b/ext/node/polyfills/testing.ts index c8219daba1eddc..678f6d608d8a8c 100644 --- a/ext/node/polyfills/testing.ts +++ b/ext/node/polyfills/testing.ts @@ -374,20 +374,6 @@ test.only = function only(name, options, fn) { return test(name, options, fn, { only: true }); }; -export function describe(name, options, fn) { - return suite(name, options, fn, {}); -} - -describe.skip = function skip(name, options, fn) { - return suite.skip(name, options, fn); -}; -describe.todo = function todo(name, options, fn) { - return suite.todo(name, options, fn); -}; -describe.only = function only(name, options, fn) { - return suite.only(name, options, fn); -}; - export function suite(name, options, fn, overrides) { if (currentSuite) { return currentSuite.addSuite(name, options, fn, overrides); @@ -405,21 +391,10 @@ suite.only = function only(name, options, fn) { return suite(name, options, fn, { only: true }); }; -export function it(name, options, fn) { - return test(name, options, fn, {}); -} - -it.skip = function skip(name, options, fn) { - return test.skip(name, options, fn); -}; - -it.todo = function todo(name, options, fn) { - return test.todo(name, options, fn); -}; - -it.only = function only(name, options, fn) { - return test.only(name, options, fn); -}; +// Match Node: `it` is just an alias for `test`, and `describe` for `suite`. +// See https://github.com/nodejs/node/blob/main/lib/test.js +export const it = test; +export const describe = suite; export function before() { notImplemented("test.before"); @@ -437,8 +412,8 @@ export function afterEach() { notImplemented("test.afterEach"); } -test.it = it; -test.describe = describe; +test.it = test; +test.describe = suite; test.suite = suite; // Store all active mocks for restoreAll() diff --git a/tests/node_compat/config.jsonc b/tests/node_compat/config.jsonc index 8ddb94991ed8a2..4a82290b1ad20f 100644 --- a/tests/node_compat/config.jsonc +++ b/tests/node_compat/config.jsonc @@ -1825,7 +1825,6 @@ // "parallel/test-inspect-address-in-use.js": {}, // "parallel/test-inspector-inspect-brk-node.js": {}, // "parallel/test-inspector-invalid-args.js": {}, - "parallel/test-inspector-close-worker.js": {}, // TODO(bartlomieju): times out @@ -2620,6 +2619,7 @@ "parallel/test-require-resolve.js": {}, "parallel/test-require-resolve-invalid-paths.js": {}, "parallel/test-require-resolve-opts-paths-relative.js": {}, + "parallel/test-runner-aliases.js": {}, "parallel/test-runner-cli-concurrency.js": { "ignore": true, "reason": "Tests Node.js-specific CLI flags/options that are not supported in Deno"