diff options
author | Satya Rohith <me@satyarohith.com> | 2021-05-04 17:57:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-04 14:27:20 +0200 |
commit | 89b61b5d05b7441d42e4e88fe1180d9d3dc1727e (patch) | |
tree | 43afe9cca75060e7f5cece65317e7ad6c4217328 /cli/tests/integration_tests.rs | |
parent | 17118c41e4bf0cd8d9b78f72349c685d383b7291 (diff) |
fix(cli): give context when failed to load import map (#10478)
Diffstat (limited to 'cli/tests/integration_tests.rs')
-rw-r--r-- | cli/tests/integration_tests.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 5cbe00302..f2d1c1770 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3841,6 +3841,17 @@ console.log("finish"); http_server: true, }); + // This test ensures that a descriptive error is shown when we're unable to load + // the import map. Even though this tests only the `run` subcommand, we can be sure + // that the error message is similar for other subcommands as they all use + // `program_state.maybe_import_map` to access the import map underneath. + itest!(error_import_map_unable_to_load { + args: + "run --import-map=import_maps/does_not_exist.json import_maps/test.ts", + output: "error_import_map_unable_to_load.out", + exit_code: 1, + }); + #[test] fn no_validate_asm() { let output = util::deno_cmd() |