summaryrefslogtreecommitdiff
path: root/cli/tests/compiler_api_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-10-26 14:03:03 +0100
committerGitHub <noreply@github.com>2020-10-26 14:03:03 +0100
commit57cad539457dff7fc273bed5ecaf08bd3dc40d1b (patch)
tree1b0c01aeaaf2c0a1723712d6b9b5baf91bfeecff /cli/tests/compiler_api_test.ts
parentaebbdd5cc2c75151be28c839878b0dee915147ef (diff)
refactor(cli): rewrite Deno.transpileOnly() to use SWC (#8090)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
Diffstat (limited to 'cli/tests/compiler_api_test.ts')
-rw-r--r--cli/tests/compiler_api_test.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/tests/compiler_api_test.ts b/cli/tests/compiler_api_test.ts
index b4a2f81ef..a845e58c6 100644
--- a/cli/tests/compiler_api_test.ts
+++ b/cli/tests/compiler_api_test.ts
@@ -129,17 +129,16 @@ Deno.test({
async fn() {
const actual = await Deno.transpileOnly(
{
- "foo.ts": `export enum Foo { Foo, Bar, Baz };\n`,
+ "foo.ts": `/** This is JSDoc */\nexport enum Foo { Foo, Bar, Baz };\n`,
},
{
- sourceMap: false,
- module: "amd",
+ removeComments: true,
},
);
assert(actual);
assertEquals(Object.keys(actual), ["foo.ts"]);
- assert(actual["foo.ts"].source.startsWith("define("));
- assert(actual["foo.ts"].map == null);
+ assert(!actual["foo.ts"].source.includes("This is JSDoc"));
+ assert(actual["foo.ts"].map);
},
});