summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/compiler_api_test.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-10-27 17:18:53 +1100
committerGitHub <noreply@github.com>2021-10-27 17:18:53 +1100
commitb44b26c8842522e0e952c31aeb42c7fb85a5c7a7 (patch)
tree9a80196aed6b669c750311dc35b4b1f4db81fd6b /cli/tests/testdata/compiler_api_test.ts
parent1c739470b590ea13dc0aa67c0ecc7ea6f49b5746 (diff)
fix(cli): no-check respects inlineSources compiler option (#12559)
Fixes #12064
Diffstat (limited to 'cli/tests/testdata/compiler_api_test.ts')
-rw-r--r--cli/tests/testdata/compiler_api_test.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/testdata/compiler_api_test.ts b/cli/tests/testdata/compiler_api_test.ts
index 914147f76..9870908d1 100644
--- a/cli/tests/testdata/compiler_api_test.ts
+++ b/cli/tests/testdata/compiler_api_test.ts
@@ -529,3 +529,31 @@ Deno.test({
);
},
});
+
+Deno.test({
+ name: "Deno.emit() - no check respects inlineSources compiler option",
+ async fn() {
+ const { files } = await Deno.emit(
+ "file:///a.ts",
+ {
+ check: false,
+ compilerOptions: {
+ types: ["file:///b.d.ts"],
+ inlineSources: true,
+ },
+ sources: {
+ "file:///a.ts": `const b = new B();
+ console.log(b.b);`,
+ "file:///b.d.ts": `declare class B {
+ b: string;
+ }`,
+ },
+ },
+ );
+ const sourceMap: { sourcesContent?: string[] } = JSON.parse(
+ files["file:///a.ts.js.map"],
+ );
+ assert(sourceMap.sourcesContent);
+ assertEquals(sourceMap.sourcesContent.length, 1);
+ },
+});