diff options
author | juju <gliheng@live.com> | 2022-01-12 20:05:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-12 13:05:06 +0100 |
commit | 50e8ab8a8630a272e9862f2fb7014107474405c6 (patch) | |
tree | f6c070945cc67d6b30506d422cdf23d5cb58babd /cli/tests/integration | |
parent | 62291e9b0e99406ac7f5a95dc329400f9f966825 (diff) |
feat(cli): add ignore directives to bundled code (#13309)
This commit adds lint and fmt ignore directives to bundled
code as well as a comment stating that the code was bundled
and shouldn't be edited manually.
Diffstat (limited to 'cli/tests/integration')
-rw-r--r-- | cli/tests/integration/bundle_tests.rs | 5 | ||||
-rw-r--r-- | cli/tests/integration/compile_tests.rs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cli/tests/integration/bundle_tests.rs b/cli/tests/integration/bundle_tests.rs index 4ef48b7e3..36ea1f8dd 100644 --- a/cli/tests/integration/bundle_tests.rs +++ b/cli/tests/integration/bundle_tests.rs @@ -442,3 +442,8 @@ itest!(bundle_export_specifier_with_alias { args: "bundle bundle/file_tests-fixture16.ts", output: "bundle/fixture16.out", }); + +itest!(bundle_ignore_directives { + args: "bundle subdir/mod1.ts", + output: "bundle_ignore_directives.test.out", +}); diff --git a/cli/tests/integration/compile_tests.rs b/cli/tests/integration/compile_tests.rs index bff03013f..1a81784af 100644 --- a/cli/tests/integration/compile_tests.rs +++ b/cli/tests/integration/compile_tests.rs @@ -130,7 +130,7 @@ fn standalone_error() { .unwrap(); assert!(!output.status.success()); assert_eq!(output.stdout, b""); - let expected_stderr = "error: Error: boom!\n at boom (file://$deno$/bundle.js:2:11)\n at foo (file://$deno$/bundle.js:5:5)\n at file://$deno$/bundle.js:7:1\n"; + let expected_stderr = "error: Error: boom!\n at boom (file://$deno$/bundle.js:6:11)\n at foo (file://$deno$/bundle.js:9:5)\n at file://$deno$/bundle.js:11:1\n"; let stderr = String::from_utf8(output.stderr).unwrap(); assert_eq!(stderr, expected_stderr); } |