diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-10-26 14:03:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 14:03:03 +0100 |
commit | 57cad539457dff7fc273bed5ecaf08bd3dc40d1b (patch) | |
tree | 1b0c01aeaaf2c0a1723712d6b9b5baf91bfeecff /cli/tests/compiler_api_test.ts | |
parent | aebbdd5cc2c75151be28c839878b0dee915147ef (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.ts | 9 |
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); }, }); |