summaryrefslogtreecommitdiff
path: root/tests/integration/run_tests.rs
AgeCommit message (Collapse)Author
2024-06-05chore: upgrade trust-dns-resolver and friends (#24108)Ryan Dahl
To avoid duplicate winreg crate in #24056 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-29fix: bump cache sqlite dbs to v2 for WAL journal mode change (#24030)David Sherret
In https://github.com/denoland/deno/pull/23955 we changed the sqlite db journal mode to WAL. This causes issues when someone is running an old version of Deno using TRUNCATE and a new version because the two fight against each other.
2024-05-29fix(ext/node): windows cancel stdin read in line mode (#23969)Divy Srivastava
This patch fixes stdin read hanging on user input when switching tty mode on Windows Fixes #21111 On Windows, when switching from line to raw mode: - Cancel ongoing console read by writing a return keypress to its input buffer. This blocks the main thread until any ongoing read has been cancelled to prevent interference with the screen state. - On the read thread, restore the cursor position to where it was before writing the enter, undoing its effect on the screen state. - Restart reading and notify the main thread.
2024-05-28feat(vendor): support modifying remote files in vendor folder without ↵David Sherret
checksum errors (#23979) Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
2024-05-14chore(tests): increase repl timeout on ci (#23812)David Sherret
https://github.com/denoland/deno/actions/runs/9084225162/job/24964698935 ``` ---- run::file_fetcher_preserves_permissions stdout ---- command /Users/runner/work/deno/deno/target/debug/deno repl --quiet command cwd /Users/runner/work/deno/deno/tests/testdata ------ Start Full Text ------ "const a = await import('http://localhost:4545/run/019_media_types.ts');\r\n" ------- End Full Text ------- Next text: "\r\n" thread 'run::file_fetcher_preserves_permissions' panicked at tests/integration/run_tests.rs:4615:15: Timed out. ``` Closes https://github.com/denoland/deno/issues/23690 Closes https://github.com/denoland/deno/issues/23682 Closes https://github.com/denoland/deno/issues/23625
2024-05-14chore: 045_proxy output stdout & stderr on failure (#23810)David Sherret
Part of https://github.com/denoland/deno/issues/23624
2024-05-09refactor(ext/tls): Implement required functionality for later SNI support ↵Matt Mastracci
(#23686) Precursor to #23236 This implements the SNI features, but uses private symbols to avoid exposing the functionality at this time. Note that to properly test this feature, we need to add a way for `connectTls` to specify a hostname. This is something that should be pushed into that API at a later time as well. ```ts Deno.test( { permissions: { net: true, read: true } }, async function listenResolver() { let sniRequests = []; const listener = Deno.listenTls({ hostname: "localhost", port: 0, [resolverSymbol]: (sni: string) => { sniRequests.push(sni); return { cert, key, }; }, }); { const conn = await Deno.connectTls({ hostname: "localhost", [serverNameSymbol]: "server-1", port: listener.addr.port, }); const [_handshake, serverConn] = await Promise.all([ conn.handshake(), listener.accept(), ]); conn.close(); serverConn.close(); } { const conn = await Deno.connectTls({ hostname: "localhost", [serverNameSymbol]: "server-2", port: listener.addr.port, }); const [_handshake, serverConn] = await Promise.all([ conn.handshake(), listener.accept(), ]); conn.close(); serverConn.close(); } assertEquals(sniRequests, ["server-1", "server-2"]); listener.close(); }, ); ``` --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2024-05-07chore: fix flaky net_listen_allow_localhost_4555 (#23726)David Sherret
Moves the test npm registry server port from `4558` to `426x`
2024-05-07chore(test): move npm registries to separate servers and to the ↵David Sherret
`tests/registry` folder (#23717) 1. Moves the npm registries to their own dedicated ports. 2. Moves the data files out of `tests/testdata/npm/registry` to `tests/registry/npm`.
2024-05-03chore: move cert itests to spec tests (#23607)David Sherret
2024-04-29FUTURE: remove import assertions support for JavaScript (#23541)Kenta Moriuchi
Ref #17944, https://github.com/swc-project/swc/issues/8893 TypeScript removes the `assert` keywords in the transpile, so this PR only works for JavaScript files
2024-04-29chore: add tests for moduleGraph2 (#23603)David Sherret
Also did some renames from underscores to hyphens
2024-04-29chore: migrate bench, publish, and more itests to spec tests (#23584)David Sherret
2024-04-27fix(ext/node): support process.stdin.unref() (#22865)Yoshiya Hinosawa
This PR adds private `[REF]()` and `[UNREF]()` methods to Stdin class, and call them from Node.js polyfill layer (`TTY` class). This enables `process.stdin.unref()` and `process.stdin.ref()` for the case when stdin is terminal. closes #21796
2024-04-23fix(workspace): provide workspace members as 'imports' in import map (#23492)Bartek Iwańczuk
This commit changes the workspace support to provide all workspace members to be available as imports based on their names and versions. Closes https://github.com/denoland/deno/issues/23343
2024-04-22feat: add jsx precompile skip element option (#23457)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR wires up a new `jsxPrecompileSkipElements` option in `compilerOptions` that can be used to exempt a list of elements from being precompiled with the `precompile` JSX transform.
2024-04-19feat(runtime): Allow embedders to perform additional access checks on file ↵Matt Mastracci
open (#23208) Embedders may have special requirements around file opening, so we add a new `check_open` permission check that is called as part of the file open process.
2024-04-19refactor: move redirect handling into deno_graph (#23444)David Sherret
2024-04-17perf: v8 code cache (#23081)Igor Zinkovsky
This PR enables V8 code cache for ES modules and for `require` scripts through `op_eval_context`. Code cache artifacts are transparently stored and fetched using sqlite db and are passed to V8. `--no-code-cache` can be used to disable. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-02fix(cli): Enforce a human delay in prompt to fix paste problem (#23184)Matt Mastracci
The permission prompt doesn't wait for quiescent input, so someone pasting a large text file into the console may end up losing the prompt. We enforce a minimum human delay and wait for a 100ms quiescent period before we write and accept prompt input to avoid this problem. This does require adding a human delay in all prompt tests, but that's pretty straightforward. I rewrote the locked stdout/stderr test while I was in here.
2024-03-15fix: handle cache body file not existing when using etag (#22931)David Sherret
2024-03-13chore: rough first pass on spec tests (#22877)David Sherret
2024-03-08fix: respect unstable "temporal" configuration in config file (#22134)Bartek Iwańczuk
Actual fix happened in https://github.com/denoland/deno/pull/22782, but this commit adds additional tests and cleans up V8 flags passed on init. Closes https://github.com/denoland/deno/issues/22123 Closes https://github.com/denoland/deno/issues/22560 Closes https://github.com/denoland/deno/issues/22557
2024-02-28fix(cli): ensure that pre- and post-test output is flushed at the ↵Matt Mastracci
appropriate times (#22611) Some `deno_std` tests were failing to print output that was resolved after the last test finished. In addition, output printed before tests began would sometimes appear above the "running X tests ..." line, and sometimes below it depending on timing. We now guarantee that all output is flushed before and after tests run, making the output consistent. Pre-test and post-test output are captured in `------ pre-test output ------` and `------ post-test output ------` blocks to differentiate them from the regular output blocks. Here's an example of a test (that is much noisier than normal, but an example of what the output will look like): ``` Check ./load_unload.ts ------- pre-test output ------- load ----- output end ----- running 1 test from ./load_unload.ts test ... ------- output ------- test ----- output end ----- test ... ok ([WILDCARD]) ------- post-test output ------- unload ----- output end ----- ```
2024-02-21fix(publish): better no-slow-types type discovery (#22517)David Sherret
2024-02-21Revert "fix(console): support NO_COLOR and colors option in all scena… ↵Bartek Iwańczuk
(#22507) …rios (#21910)" This reverts commit bd1358efab8ba7339a8e70034315fa7da840292e. This change caused https://github.com/denoland/deno/issues/22496 and https://github.com/denoland/deno/issues/22445
2024-02-19feat(core): highlight unprintable chars in permission prompts (#22468)Matt Mastracci
If we strip out unprintable chars, we don't see the full filename being requested by permission prompts. Instead, we highlight and escape them to make them visible.
2024-02-18feat(fs): `Deno.FsFile.{isTerminal,setRaw}()` (#22234)Asher Gomez
Closes #22229. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-02-15feat(unstable): single checksum per JSR package in the lockfile (#22421)David Sherret
This changes the lockfile to not store JSR specifiers in the "remote" section. Instead a single JSR integrity is stored per package in the lockfile, which is a hash of the version's `x.x.x_meta.json` file, which contains hashes for every file in the package. The hashes in this file are then compared against when loading. Additionally, when using `{ "vendor": true }` in a deno.json, the files can be modified without causing lockfile errors—the checksum is only checked when copying into the vendor folder and not afterwards (eventually we should add this behaviour for non-jsr specifiers as well). As part of this change, the `vendor` folder creation is not always automatic in the LSP and running an explicit cache command is necessary. The code required to track checksums in the LSP would have been too complex for this PR, so that all goes through deno_graph now. The vendoring is still automatic when running from the CLI.
2024-02-15chore: add DENO_FUTURE env var (#22318)Divy Srivastava
Closes https://github.com/denoland/deno/issues/22315 ``` ~> DENO_FUTURE=1 target/debug/deno > globalThis.window undefined ```
2024-02-12chore: continue tests/ re-org (#22396)Matt Mastracci
Split `node_compat_tests` into its own top-level test so its stdout doesn't stomp on the remainder of the tests.
2024-02-12fix(console): support NO_COLOR and colors option in all scenarios (#21910)Leo Kettmeir
Noticed in #21607
2024-02-10chore: move cli/tests/ -> tests/ (#22369)Matt Mastracci
This looks like a massive PR, but it's only a move from cli/tests -> tests, and updates of relative paths for files. This is the first step towards aggregate all of the integration test files under tests/, which will lead to a set of integration tests that can run without the CLI binary being built. While we could leave these tests under `cli`, it would require us to keep a more complex directory structure for the various test runners. In addition, we have a lot of complexity to ignore various test files in the `cli` project itself (cargo publish exclusion rules, autotests = false, etc). And finally, the `tests/` folder will eventually house the `test_ffi`, `test_napi` and other testing code, reducing the size of the root repo directory. For easier review, the extremely large and noisy "move" is in the first commit (with no changes -- just a move), while the remainder of the changes to actual files is in the second commit.