Skip to content

Commit

Permalink
patch export default within sandbox correctly (#5346)
Browse files Browse the repository at this point in the history
fixes #5345
  • Loading branch information
alexlamsl committed Feb 10, 2022
1 parent b6c72c8 commit 33c163f
Show file tree
Hide file tree
Showing 4 changed files with 533 additions and 502 deletions.
17 changes: 17 additions & 0 deletions test/input/reduce/export_default.js
@@ -0,0 +1,17 @@
var unused;
export default class {
____11111() {
a, b, c, d, e;
f, g, h, i, j;
k, l, m, n, o;
p, q, r, s, t;
u, v, w, x, y, z;
A, B, C, D, E;
F, G, H, I, J;
K, L, M, N, O;
P, Q, R, S, T;
U, V, W, X, Y, Z;
$, _;
unused;
}
}
14 changes: 14 additions & 0 deletions test/mocha/reduce.js
Expand Up @@ -434,4 +434,18 @@ describe("test/reduce.js", function() {
"// }",
].join("\n"));
});
it("Should transform `export default` correctly", function() {
var result = reduce_test(read("test/input/reduce/export_default.js"), {
compress: false,
toplevel: true,
});
if (result.error) throw result.error;
assert.strictEqual(result.code, [
"// Can't reproduce test failure",
"// minify options: {",
'// "compress": false,',
'// "toplevel": true',
"// }",
].join("\n"));
});
});

0 comments on commit 33c163f

Please sign in to comment.