summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-04-11chore(cli): clean up unused number value (#18661)Geert-Jan Zwiers
This PR removes an accidentally declared number value.
2023-04-11fix(ext/kv): keys must be arrays (#18655)Luca Casonato
There was some leftover code from previous iterations, where keys could be single parts instead of arrays also. This didn't match the types.
2023-04-07fix(ext/node): add X509Certificate (#18625)Divy Srivastava
Towards #18455
2023-04-06fix(npm): reload an npm package's dependency's information when version not ↵David Sherret
found (#18622) This reloads an npm package's dependency's information when a version/version req/tag is not found. This PR applies only to dependencies of npm packages. It does NOT yet cause npm specifiers to have their dependency information cache busted. That requires a different solution, but this should help cache bust in more scenarios. Part of #16901, but doesn't close it yet
2023-04-06refactor(npm): use deno_npm and deno_semver (#18602)David Sherret
2023-04-06chore: fix flaky tests checking ms when CI is slow (#18559)David Sherret
2023-04-06fix(ext/node): implement hkdf-expand (#18612)Divy Srivastava
Towards https://github.com/denoland/deno/issues/18455
2023-04-06fix(ext/node): fix unable to resolve fraction.js (#18544)Marvin Hagemeister
Turns out `autoprefixer` is a better reproduction case then `microbundle`. Fixes #18535 Fixes #18600 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-06fix(ext/node): add symmetric keygen (#18609)Divy Srivastava
Towards #18455
2023-04-06fix(ext/node): json encode binary command name (#18596)Geert-Jan Zwiers
Fixes https://github.com/denoland/deno/issues/18588
2023-04-05tests: cleanup "node_compat_tests" (#18594)Bartek Iwańczuk
A few drive-by cleanup while I'm working on the "crypto" module. It makes it easier and faster to debug the failing test case.
2023-04-04refactor(ext/http): bring back 'reusePort' option for 'Deno.serve()' (#18590)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/18582
2023-04-04feat(ext/url): `URL.canParse` (#18286)Kenta Moriuchi
2023-04-03refactor: remove "ext/flash" (#18578)Bartek Iwańczuk
With https://github.com/denoland/deno/pull/18568 landed we no longer need "ext/flash". This commit removes "deno_flash" extension completely. This should have some impact on the binary and snapshot size. Closes https://github.com/denoland/deno/issues/17356
2023-04-03refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally (#18568)Bartek Iwańczuk
This commit changes implementation of "Deno.serve()" API to use "Deno.serveHttp()" under the hood. This change will allow us to remove the "flash" server implementation, bringing stability to the "Deno.serve()" API. "cli/tests/unit/flash_test.ts" was renamed to "serve_test.ts". Closes https://github.com/denoland/deno/issues/15574 Closes https://github.com/denoland/deno/issues/15504 Closes https://github.com/denoland/deno/issues/15646 Closes https://github.com/denoland/deno/issues/15909 Closes https://github.com/denoland/deno/issues/15911 Closes https://github.com/denoland/deno/issues/16828 Closes https://github.com/denoland/deno/issues/18046 Closes https://github.com/denoland/deno/issues/15869
2023-04-03Revert "fix(cli): don't store blob and data urls in the module cache ↵Yoshiya Hinosawa
(#18261)" (#18572) This reverts commit b4c61c146a50dea0c4a53d8d505a4308ea7da279. cc @nayeemrmn
2023-04-01fix(test): don't swallow sanitizer errors with permissions (#18550)Nayeem Rahman
Missing `return` from #18246.
2023-04-01fix(repl): disable language server document preloading in the repl (#18543)David Sherret
This was an oversight because the repl uses the language server under the hood. Also, never preloads from a root directory. Part of #18538
2023-04-01fix(check): ensure diagnostics caused by changes in other files get ↵David Sherret
invalidated between runs (#18541) Regression caused by the performance improvement in #18329. Figuring this out was hard. It's luckily still fast after this change. Closes #18516
2023-03-31fix: upgrade to TypeScript 5.0.3 (#18532)David Sherret
2023-03-31fix(lsp): better handling of `data:` urls (#18527)David Sherret
1. Log instead of error when the referrer can't be found 2. Fixes typescript to resolve data urls correctly. Properly documented here: https://github.com/denoland/TypeScript/pull/4/files#diff-180da7c288743d11d8590d30f0c07c48e5dcf291aa671bbea0dd520a9a1359d2 Closes #18524
2023-03-30fix(lsp): include all diagnosable documents on initialize (#17979)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/797 Closes https://github.com/denoland/deno/issues/11190 Closes https://github.com/denoland/vscode_deno/issues/811 Closes https://github.com/denoland/vscode_deno/issues/761 Closes https://github.com/denoland/vscode_deno/issues/585 Closes https://github.com/denoland/vscode_deno/issues/561 Closes https://github.com/denoland/vscode_deno/issues/410
2023-03-30fix(dts): improve types for the Deno.KV API (#18510)Luca Casonato
2023-03-30feat(ext/kv): return versionstamp from set/commit (#18512)Luca Casonato
This commit updates the `Deno.Kv` API to return the new commited versionstamp for the mutated data from `db.set` and `ao.commit`. This is returned in the form of a `Deno.KvCommitResult` object that has a `versionstamp` property.
2023-03-30fix(coverage): ignore files from npm registry (#18457)Geert-Jan Zwiers
Fixes https://github.com/denoland/deno/issues/17664 and part of https://github.com/denoland/deno/issues/18454 by excluding files belonging to npm modules by default in the coverage output.
2023-03-30fix(lsp): `textDocument/references` should respect `includeDeclaration` (#18496)David Sherret
2023-03-30Revert "refactor(ext/node): Use Deno.inspect (#17960)" (#18491)Bartek Iwańczuk
This reverts commit a3529d02329e0d2127ad2a5bb78b4c476ddd6984. This change made debugging Node tests very hard - `AssertionError` is now printed as `[Circular *1]` giving no visibility what failed. We need to align two implementations together and remove this one then.
2023-03-30fix(repl): improve package.json support (#18497)David Sherret
1. Fixes a cosmetic issue in the repl where it would display lsp warning messages. 2. Lazily loads dependencies from the package.json on use. 3. Supports using bare specifiers from package.json in the REPL. Closes #17929 Closes #18494
2023-03-30chore(ext/node): run node compat parallel tests in core number concurrency ↵Yoshiya Hinosawa
(#18505) We currently run the all test cases in `parallel` category at the same time, which invokes hundreds process at the same time, and that seems causing some flakiness in CI. (maybe related to #18487) This PR limits the concurrency to the number of cpu cores. This is more aligned to how Node.js run their `parallel` test in their repository. https://github.com/nodejs/node/blob/42c4a359525f70c322c0df0eac188fa2b05c3f53/Makefile#L356
2023-03-30test: fix test_check_origin_not_supported (#18504)Bartek Iwańczuk
Merge of dotland and dotcom caused this test to fail.
2023-03-29test(ext/node): add timers_tests.ts from std/node (#18472)Andrew Nester
2023-03-29test(ext/node): add string_decoder_test.ts from std/node (#18473)Andrew Nester
2023-03-29chore: fix flaky pty_internal_repl (#18486)David Sherret
2023-03-28test(lsp): make lsp_completions_auto_import more robust (#18482)Bartek Iwańczuk
A completely unrelated change in https://github.com/denoland/deno/pull/18286 threw of this test. These changes make it more robust and easier to update in such cases.
2023-03-28chore: restore pty tests and make them run on the Linux CI (#18424)David Sherret
1. Rewrites the tests to be more back and forth rather than getting the output all at once (which I believe was causing the hangs on linux and maybe mac) 2. Runs the pty tests on the linux ci. 3. Fixes a bunch of tests that were just wrong. 4. Adds timeouts on the pty tests.
2023-03-28refactor: move shared library tests to their own file (#18479)Ryan Dahl
2023-03-28test(node/fs): add fs.Dir tests (#18463)Kamal Singh
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-03-28fix(ext/node): implement crypto.Sign (RSA/PEM/SHA{224,256,384,512}) (#18471)Yoshiya Hinosawa
2023-03-28feat(ext/node): add `crypto.checkPrime` API (#18465)Divy Srivastava
Towards #18455 This commit implements `checkPrimeSync` and `checkPrime` in node:crypto using the Miller-Rabin primality test (fun fact: it actually is a test for composite numbers) It first compares the candidate against many known small primes and if not, proceeds to run the Miller-Rabin primality test. http://nickle.org/examples/miller-rabin.5c used as reference implementation.
2023-03-28chore(ext/node): port pbkdf2 to Rust (#18470)Divy Srivastava
Towards #18455
2023-03-28chore: add test for Linux shared libraries (#18461)Andrew Nester
Closes #18266
2023-03-27feat(core): initialize SQLite off-main-thread (#18401)Matt Mastracci
This gets SQLite off the flamegraph and reduces initialization time by somewhere between 0.2ms and 0.5ms. In addition, I took the opportunity to move all the cache management code to a single place and reduce duplication. While the PR has a net gain of lines, much of that is just being a bit more deliberate with how we're recovering from errors. The existing caches had various policies for dealing with cache corruption, so I've unified them and tried to isolate the decisions we make for recovery in a single place (see `open_connection` in `CacheDB`). The policy I chose was: 1. Retry twice to open on-disk caches 2. If that fails, try to delete the file and recreate it on-disk 3. If we fail to delete the file or re-create a new cache, use a fallback strategy that can be chosen per-cache: InMemory (temporary cache for the process run), BlackHole (ignore writes, return empty reads), or Error (fail on every operation). The caches all use the same general code now, and share the cache failure recovery policy. In addition, it cleans up a TODO in the `NodeAnalysisCache`.
2023-03-27fix(ext/node): add missing _preloadModules hook (#18447)Marvin Hagemeister
This internal node hook is used by libraries such as `ts-node` when used as a require hook `node -r ts-node/register`. That combination is often used with test frameworks like `mocha` or `jasmine`. We had a reference to `Module._preloadModules` in our code, but the implementation was missing. While fixing this I also noticed that the `fakeParent` module that we create internally always threw because of the `pathDirname` check on the module id in the constructor of `Mdoule`. So this code path was probably broken for a while. ```txt ✖ ERROR: Error: Empty filepath. at pathDirname (ext:deno_node/01_require.js:245:11) at new Module (ext:deno_node/01_require.js:446:15) at Function.Module._resolveFilename (ext:deno_node/01_require.js:754:28) at Function.resolve (ext:deno_node/01_require.js:1015:19) ```
2023-03-26feat(bench): add `--no-run` flag (#18433)Geert-Jan Zwiers
2023-03-26test(ext/node): Port crypto tests from std/node (#18382)Max Dahlgren
2023-03-26fix(cli): don't store blob and data urls in the module cache (#18261)Nayeem Rahman
2023-03-25feat(test): print pending tests on sigint (#18246)Nayeem Rahman
2023-03-25chore(tests): enable `single_compile_with_reload` again (#18196)Geert-Jan Zwiers
2023-03-25chore(ext/kv): add limits (#18415)Heyang Zhou
2023-03-25fix(ext/node): add aes-128-ecb algorithm support (#18412)Yoshiya Hinosawa