Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Nov 17, 2022
1 parent 94622f0 commit d9e8772
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions node-swc/__tests__/minify_test.mjs
Expand Up @@ -197,7 +197,8 @@ describe("should remove comments", () => {
(function(){
/**
* @license
*/const longName = Math.random() + '_' + Math.random();
*/
const longName = Math.random() + '_' + Math.random();
console.log(longName);
})()
`,
Expand All @@ -212,7 +213,7 @@ describe("should remove comments", () => {
expect(code).toMatchInlineSnapshot(`
"(function(){/**
* @license
*/ const o=Math.random()+\\"_\\"+Math.random();console.log(o)})();"
*/const o=Math.random()+\\"_\\"+Math.random();console.log(o)})();"
`);
});
it("should remove comment near to license", async () => {
Expand All @@ -224,7 +225,8 @@ describe("should remove comments", () => {
*/
/*
* 1
*/const longName = Math.random() + '_' + Math.random();
*/
const longName = Math.random() + '_' + Math.random();
console.log(longName);
})()
`,
Expand All @@ -239,7 +241,7 @@ describe("should remove comments", () => {
expect(code).toMatchInlineSnapshot(`
"(function(){/**
* @license
*/ const o=Math.random()+\\"_\\"+Math.random();console.log(o)})();"
*/const o=Math.random()+\\"_\\"+Math.random();console.log(o)})();"
`);
});
});

0 comments on commit d9e8772

Please sign in to comment.