File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -279,5 +279,37 @@ let html = `
279279 is $got , $expect ;
280280};
281281
282+ # ##############################################################################
283+ # JS that minifies to "nothing"
284+ subtest ' minifies to nothing' => sub {
285+ subtest ' block comment' => sub {
286+ my $given = ' /* */' ;
287+ my $expect = undef ;
288+ my $got = minify($given );
289+ is $got , $expect
290+ };
291+
292+ subtest ' line comment' => sub {
293+ my $given = ' // foo' ;
294+ my $expect = undef ;
295+ my $got = minify($given );
296+ is $got , $expect
297+ };
298+
299+ subtest ' just whitespace' => sub {
300+ my $given = " \r\n \t " ;
301+ my $expect = undef ;
302+ my $got = minify($given );
303+ is $got , $expect
304+ };
305+
306+ subtest ' empty string' => sub {
307+ my $given = ' ' ;
308+ my $expect = undef ;
309+ my $got = minify($given );
310+ is $got , $expect
311+ };
312+ };
313+
282314# ##############################################################################
283315done_testing();
You can’t perform that action at this time.
0 commit comments