diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/run_tests.rs | 3 | ||||
-rw-r--r-- | cli/tests/integration/vendor_tests.rs | 8 | ||||
-rw-r--r-- | cli/tests/testdata/vendor/dynamic_non_existent.ts | 11 | ||||
-rw-r--r-- | cli/tests/testdata/vendor/dynamic_non_existent.ts.out | 7 |
4 files changed, 29 insertions, 0 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 3f2b8d81f..6baa408e9 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -3379,6 +3379,9 @@ async fn test_resolve_dns() { .unwrap(); let err = String::from_utf8_lossy(&output.stderr); let out = String::from_utf8_lossy(&output.stdout); + if !output.status.success() { + eprintln!("stderr: {err}"); + } assert!(output.status.success()); assert!(err.starts_with("Check file")); diff --git a/cli/tests/integration/vendor_tests.rs b/cli/tests/integration/vendor_tests.rs index cd2f7f12e..1f159fe80 100644 --- a/cli/tests/integration/vendor_tests.rs +++ b/cli/tests/integration/vendor_tests.rs @@ -478,6 +478,14 @@ fn dynamic_non_analyzable_import() { assert!(output.status.success()); } +itest!(dynamic_non_existent { + args: "vendor http://localhost:4545/vendor/dynamic_non_existent.ts", + temp_cwd: true, + exit_code: 0, + http_server: true, + output: "vendor/dynamic_non_existent.ts.out", +}); + #[test] fn update_existing_config_test() { let _server = http_server(); diff --git a/cli/tests/testdata/vendor/dynamic_non_existent.ts b/cli/tests/testdata/vendor/dynamic_non_existent.ts new file mode 100644 index 000000000..a48e2accb --- /dev/null +++ b/cli/tests/testdata/vendor/dynamic_non_existent.ts @@ -0,0 +1,11 @@ +// this should still vendor +// deno-lint-ignore no-constant-condition +if (false) { + await import("./non-existent.js"); +} + +export class Logger { + log(text: string) { + console.log(text); + } +} diff --git a/cli/tests/testdata/vendor/dynamic_non_existent.ts.out b/cli/tests/testdata/vendor/dynamic_non_existent.ts.out new file mode 100644 index 000000000..a1b2ade81 --- /dev/null +++ b/cli/tests/testdata/vendor/dynamic_non_existent.ts.out @@ -0,0 +1,7 @@ +Download http://localhost:4545/vendor/dynamic_non_existent.ts +Download http://localhost:4545/vendor/non-existent.js +Ignoring: Dynamic import not found "http://localhost:4545/vendor/non-existent.js". + at http://localhost:4545/vendor/dynamic_non_existent.ts:4:16 +Vendored 1 module into vendor/ directory. + +To use vendored modules, specify the `--import-map vendor/import_map.json` flag when invoking Deno subcommands or add an `"importMap": "<path_to_vendored_import_map>"` entry to a deno.json file. |