diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-09-14 13:51:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 17:51:28 +0000 |
commit | e66d3c2c2e287879a757e12943a6d240981cb9e8 (patch) | |
tree | 827f518778324a091fa3fbbe8f533fc10b74200a /cli/tests/integration/npm_tests.rs | |
parent | 54890ee98b9068af41214b86fb693135f0998a0a (diff) |
refactor: remove `DENO_UNSTABLE_NPM_SYNC_DOWNLOAD` and custom sync functionality (#20504)
https://github.com/denoland/deno/pull/20488 enables us to remove this
functionality. This is better because our test suite is now not testing
a separate code path.
Diffstat (limited to 'cli/tests/integration/npm_tests.rs')
-rw-r--r-- | cli/tests/integration/npm_tests.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cli/tests/integration/npm_tests.rs b/cli/tests/integration/npm_tests.rs index f9746f508..ff600637c 100644 --- a/cli/tests/integration/npm_tests.rs +++ b/cli/tests/integration/npm_tests.rs @@ -1689,8 +1689,10 @@ itest!(non_existent_dep { http_server: true, exit_code: 1, output_str: Some(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/non-existent-dep\n", "Download http://localhost:4545/npm/registry/@denotest/non-existent\n", + "[UNORDERED_END]\n", "error: npm package '@denotest/non-existent' does not exist.\n" )), }); @@ -1701,12 +1703,16 @@ itest!(non_existent_dep_version { http_server: true, exit_code: 1, output_str: Some(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/non-existent-dep-version\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic\n", + "[UNORDERED_END]\n", // does two downloads because when failing once it max tries to // get the latest version a second time + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/non-existent-dep-version\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic\n", + "[UNORDERED_END]\n", "error: Could not find npm package '@denotest/esm-basic' matching '=99.99.99'.\n" )), }); @@ -1760,12 +1766,14 @@ fn reload_info_not_found_cache_but_exists_remote() { .args("cache main.ts npm:@denotest/esm-basic@1.0.0") .run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export/1.0.0.tgz\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic/1.0.0.tgz\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default/1.0.0.tgz\n", + "[UNORDERED_END]\n", )); // test in dependency @@ -1788,8 +1796,10 @@ fn reload_info_not_found_cache_but_exists_remote() { // now try running without it, it should download the package now let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", + "[UNORDERED_END]\n", "Node esm importing node cjs\n[WILDCARD]", )); output.assert_exit_code(0); @@ -1818,8 +1828,10 @@ fn reload_info_not_found_cache_but_exists_remote() { // now try running, it should work let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", + "[UNORDERED_END]\n", "Node esm importing node cjs\n[WILDCARD]", )); output.assert_exit_code(0); @@ -1854,10 +1866,14 @@ fn reload_info_not_found_cache_but_exists_remote() { // now try running, it should work let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", + "[UNORDERED_END]\n", + "[UNORDERED_START]\n", "Initialize @denotest/cjs-default-export@1.0.0\n", "Initialize @denotest/esm-import-cjs-default@1.0.0\n", + "[UNORDERED_END]\n", "Node esm importing node cjs\n[WILDCARD]", )); output.assert_exit_code(0); @@ -1887,9 +1903,11 @@ fn reload_info_not_found_cache_but_exists_remote() { // now try running, it should work and only initialize the new package let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", + "[UNORDERED_END]\n", "Initialize @denotest/esm-basic@1.0.0\n", "Node esm importing node cjs\n[WILDCARD]", )); @@ -1923,9 +1941,11 @@ fn reload_info_not_found_cache_but_exists_remote() { // now try running, it should work and only initialize the new package let output = test_context.new_command().args("run main.ts").run(); output.assert_matches_text(concat!( + "[UNORDERED_START]\n", "Download http://localhost:4545/npm/registry/@denotest/cjs-default-export\n", "Download http://localhost:4545/npm/registry/@denotest/esm-basic\n", "Download http://localhost:4545/npm/registry/@denotest/esm-import-cjs-default\n", + "[UNORDERED_END]\n", "Node esm importing node cjs\n[WILDCARD]", )); output.assert_exit_code(0); |