|
Some checks are pending
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This PR implements `node:fs` `fchmod` and `fchmodSync`. Towards https://github.com/denoland/deno/issues/27664 . |
||
|---|---|---|
| .. | ||
| suite@8846b5392f | ||
| .gitignore | ||
| challenge_new_test.ts | ||
| deno.json | ||
| README.md | ||
| setup.ts | ||
| TODO.md | ||
Tools for Node.js compatibility work
We run native Node.js test cases against our Node.js compatibility feature.
This directory includes the tools for downloading, setting up, and updating the Node.js compat testing in Deno repository.
//tests/node_compat/runner/setup.ts- This script sets up the Node.js compat tests.
//tests/node_compat/runner/versions/- Node.js source tarballs and extracted test cases are stored here.
//tests/node_compat/config.jsonc- This json file stores the settings about which Node.js compat test to run with Deno.
//tests/node_compat/test- The actual test cases are stored here.
Steps to add new test cases from Node.js test cases
- Update
testsproperty of//tests/node_compat/config.jsonc. For example, if you want to addtest/parallel/test-foo.jsfrom Node.js test cases, then addtest-foo.jsentry intests.parallelarray property inconfig.jsonc - Run
deno task setupintests/node_compat/runnerdir.
The above command copies the updated items from Node.js tarball to the Deno source tree.
Ideally Deno should pass the Node.js compat tests without modification, but if
you need to modify it, then add that item in ignore property of
config.jsonc. Then setup.ts doesn't overwrite the modified Node.js test
cases anymore.
If the test needs to be ignored in particular platform, then add them in
${platform}Ignore property of config.jsonc
Run Node.js test cases
Node.js compat tests are run as part of cargo test command. If you want to run
only the Node.js compat test cases you can use the command
cargo test node_compat. If you want to run specific tests you can use the
command deno task test (in tests/node_compat/runner dir). For example, if
you want to run all test files which contains buffer in filename you can use
the command:
/path/to/deno/tests/node_compat/runner
$ deno task test buffer