diff options
author | Andrew Mitchell <32021055+mitch292@users.noreply.github.com> | 2021-03-18 20:02:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 20:02:29 -0400 |
commit | 277e19f4d26b66bbba99b0a3d6539b524dc88830 (patch) | |
tree | f1aa56bf62b547b8823cd2efecc5f87770b1563a /cli/tests | |
parent | 7d12dd18992cc58ce9866c2e42d914c8c8cf6d7a (diff) |
fix(cli/bundle): display anyhow error chain (#9822)
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/error_027_bare_import_error.ts | 1 | ||||
-rw-r--r-- | cli/tests/error_027_bare_import_error.ts.out | 8 | ||||
-rw-r--r-- | cli/tests/import_data_url_import_relative.ts.out | 3 | ||||
-rw-r--r-- | cli/tests/integration_tests.rs | 6 |
4 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/error_027_bare_import_error.ts b/cli/tests/error_027_bare_import_error.ts new file mode 100644 index 000000000..c0748305d --- /dev/null +++ b/cli/tests/error_027_bare_import_error.ts @@ -0,0 +1 @@ +import "foo"; diff --git a/cli/tests/error_027_bare_import_error.ts.out b/cli/tests/error_027_bare_import_error.ts.out new file mode 100644 index 000000000..b52873d89 --- /dev/null +++ b/cli/tests/error_027_bare_import_error.ts.out @@ -0,0 +1,8 @@ +[WILDCARD]error: Unable to output bundle during Graph::bundle(). + +Caused by: + 0: load_transformed failed + 1: failed to analyze module + 2: failed to resolve foo from <file:///[WILDCARD]/error_027_bare_import_error.ts> + 3: The graph is missing a dependency. + Specifier: foo from file:///[WILDCARD]/error_027_bare_import_error.ts diff --git a/cli/tests/import_data_url_import_relative.ts.out b/cli/tests/import_data_url_import_relative.ts.out index 5123f2fe4..1f4f3e9ef 100644 --- a/cli/tests/import_data_url_import_relative.ts.out +++ b/cli/tests/import_data_url_import_relative.ts.out @@ -1 +1,4 @@ error: invalid URL: relative URL with a cannot-be-a-base base + +Caused by: + relative URL with a cannot-be-a-base base diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 4be586351..e7fc7797b 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -3148,6 +3148,12 @@ console.log("finish"); http_server: true, }); + itest!(error_027_bare_import_error { + args: "bundle error_027_bare_import_error.ts", + output: "error_027_bare_import_error.ts.out", + exit_code: 1, + }); + itest!(error_missing_module_named_import { args: "run --reload error_missing_module_named_import.ts", output: "error_missing_module_named_import.ts.out", |