Skip to content

Commit 533005b

Browse files
test: port #22942's fix for the jsMinify event handler tests main fails
1 parent 944a507 commit 533005b

2 files changed

Lines changed: 0 additions & 34 deletions

File tree

‎test/unitCases/javascript/__snapshots__/printer.unittest.js.snap‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2409,14 +2409,6 @@ Array [
24092409
]
24102410
`;
24112411

2412-
exports[`jsMinify should minify: an event handler dropped whole (with source map) 1`] = `"var a = 1;"`;
2413-
2414-
exports[`jsMinify should minify: an event handler dropped whole (with source map) 2`] = `Array []`;
2415-
2416-
exports[`jsMinify should minify: an event handler dropped whole 1`] = `"var a = 1;"`;
2417-
2418-
exports[`jsMinify should minify: an event handler dropped whole 2`] = `Array []`;
2419-
24202412
exports[`jsMinify should minify: an event handler holding runs of \`_\` (with source map) 1`] = `"__a(_b,___c)"`;
24212413

24222414
exports[`jsMinify should minify: an event handler holding runs of \`_\` (with source map) 2`] = `Array []`;

‎test/unitCases/javascript/printer.unittest.js‎

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16250,12 +16250,6 @@ const MINIFY_CASES = [
1625016250
{ as: "event-handler" },
1625116251
true
1625216252
],
16253-
[
16254-
"an event handler dropped whole",
16255-
{ "handler.js": "var a = 1;" },
16256-
{ as: "event-handler", toplevel: true },
16257-
true
16258-
]
1625916253
];
1626016254

1626116255
describe("jsMinify", () => {
@@ -16331,26 +16325,6 @@ describe("jsMinify", () => {
1633116325
expect(code).toBe('console.log("é");');
1633216326
});
1633316327

16334-
it("should give an event handler back as written where no code is asked for", async () => {
16335-
const result = await jsMinify(
16336-
{ "handler.js": "a( 1 )" },
16337-
undefined,
16338-
{ as: "event-handler", format: { code: false } },
16339-
false
16340-
);
16341-
expect(result.code).toBe("a( 1 )");
16342-
});
16343-
16344-
it("should give an event handler dropped whole back as written", async () => {
16345-
const result = await jsMinify(
16346-
{ "handler.js": "var a = 1;" },
16347-
undefined,
16348-
{ as: "event-handler", toplevel: true },
16349-
false
16350-
);
16351-
expect(result.code).toBe("var a = 1;");
16352-
});
16353-
1635416328
it("should match string comment patterns like RegExp conditions", async () => {
1635516329
const input = {
1635616330
"comments.js":

0 commit comments

Comments
 (0)