mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
refactor(cli): rewrite Deno.transpileOnly() to use SWC (#8090)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
This commit is contained in:
parent
aebbdd5cc2
commit
57cad53945
8 changed files with 178 additions and 131 deletions
|
@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue