summaryrefslogtreecommitdiff
path: root/cli/tests/compiler_api_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-09 13:37:22 +0200
committerGitHub <noreply@github.com>2020-09-09 13:37:22 +0200
commitc14436a424449d845a769a70ca7bc3d313201482 (patch)
tree4ff0300a43dafcf6db6860fdf403fbc22f3d67e4 /cli/tests/compiler_api_test.ts
parent79b25106170b1c35103aeea6cb8cf549e807e50c (diff)
fix(tsc): config resolution using relative paths (#7392)
Diffstat (limited to 'cli/tests/compiler_api_test.ts')
-rw-r--r--cli/tests/compiler_api_test.ts18
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/compiler_api_test.ts b/cli/tests/compiler_api_test.ts
index 311dae8fd..b4a2f81ef 100644
--- a/cli/tests/compiler_api_test.ts
+++ b/cli/tests/compiler_api_test.ts
@@ -76,6 +76,24 @@ Deno.test({
});
Deno.test({
+ name: "Deno.compile() - pass outDir in compiler options",
+ async fn() {
+ const [diagnostics, actual] = await Deno.compile(
+ "src/foo.ts",
+ {
+ "src/foo.ts": "console.log('Hello world')",
+ },
+ {
+ outDir: "./lib",
+ },
+ );
+ assert(diagnostics == null);
+ assert(actual);
+ assertEquals(Object.keys(actual), ["lib/foo.js.map", "lib/foo.js"]);
+ },
+});
+
+Deno.test({
name: "Deno.compile() - properly handles .d.ts files",
async fn() {
const [diagnostics, actual] = await Deno.compile(