1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/tests/node_compat
Nathan Whitaker 219a27dde5
fix(ext/node): Support returning tokens and option defaults in node:util.parseArgs (#23192)
Fixes #23179.
Fixes #22454.

Enables passing `{tokens: true}` to `parseArgs` and setting default
values for options.

With this PR, the observable framework works with deno out of the box
(no unstable flags needed).

The existing code was basically copied straight from node, so this PR
mostly just updates that (out of date) vendored code. Also fixes some
issues with error exports (before this PR, in certain error cases we
were attempting to construct error classes that weren't actually in
scope).

The last change (in the second commit) adds a small hack so that we
actually exercise the `test-parse-args.js` node_compat test, previously
it was reported as passing though it should have failed. That test now
passes.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-02 16:20:48 -07:00
..
runner chore: move tools/node_compat to tests/node_compat/runner (#23025) 2024-04-03 09:24:55 +11:00
test chore: move tools/node_compat to tests/node_compat/runner (#23025) 2024-04-03 09:24:55 +11:00
common.ts chore: use @std import instead of @test_util/std (#22398) 2024-02-13 02:05:10 +00:00
config.jsonc fix(ext/node): Add fs.readv, fs.readvSync (#23166) 2024-04-01 20:42:49 -07:00
deno.json chore: move test_util/std to tests/util/std (#22402) 2024-02-13 09:22:49 -07:00
polyfill_globals.js chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
runner.ts chore: use @std import instead of @test_util/std (#22398) 2024-02-13 02:05:10 +00:00
test.ts fix(ext/node): Support returning tokens and option defaults in node:util.parseArgs (#23192) 2024-04-02 16:20:48 -07:00
test_runner.rs chore: continue tests/ re-org (#22396) 2024-02-12 17:13:14 -07:00