From b44b26c8842522e0e952c31aeb42c7fb85a5c7a7 Mon Sep 17 00:00:00 2001 From: Kitson Kelly Date: Wed, 27 Oct 2021 17:18:53 +1100 Subject: fix(cli): no-check respects inlineSources compiler option (#12559) Fixes #12064 --- cli/tests/testdata/compiler_api_test.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'cli/tests') 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); + }, +}); -- cgit v1.2.3