diff options
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r-- | cli/tests/testdata/bundle_ignore_directives.test.out | 6 | ||||
-rw-r--r-- | cli/tests/testdata/compiler_api_test.ts | 13 |
2 files changed, 18 insertions, 1 deletions
diff --git a/cli/tests/testdata/bundle_ignore_directives.test.out b/cli/tests/testdata/bundle_ignore_directives.test.out new file mode 100644 index 000000000..b69c2632c --- /dev/null +++ b/cli/tests/testdata/bundle_ignore_directives.test.out @@ -0,0 +1,6 @@ +[WILDCARD] +// deno-fmt-ignore-file +// deno-lint-ignore-file +// This code was bundled using `deno bundle` and it's not recommended to edit it manually + +[WILDCARD] diff --git a/cli/tests/testdata/compiler_api_test.ts b/cli/tests/testdata/compiler_api_test.ts index 30fc19d5f..41378f941 100644 --- a/cli/tests/testdata/compiler_api_test.ts +++ b/cli/tests/testdata/compiler_api_test.ts @@ -418,10 +418,21 @@ Deno.test({ "/b.ts": `export const b = "b";`, }, }); + const ignoreDirecives = [ + "// deno-fmt-ignore-file", + "// deno-lint-ignore-file", + "// This code was bundled using `deno bundle` and it's not recommended to edit it manually", + "", + "", + ].join("\n"); assert(diagnostics); assertEquals(diagnostics.length, 0); assertEquals(Object.keys(files).length, 2); - assert(files["deno:///bundle.js"].startsWith("(function() {\n")); + assert( + files["deno:///bundle.js"].startsWith( + ignoreDirecives + "(function() {\n", + ), + ); assert(files["deno:///bundle.js"].endsWith("})();\n")); assert(files["deno:///bundle.js.map"]); }, |