summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/compiler_api_test.ts
diff options
context:
space:
mode:
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);
+ },
+});