Add JS comment test

This commit is contained in:
Wilson Lin 2021-01-26 21:25:08 +11:00
parent 6c0fe45606
commit 83efa7e8a8
1 changed files with 6 additions and 0 deletions

View File

@ -413,6 +413,12 @@ fn test_js_minification() {
<script>let b = 2;</script>
"#, b"<script>let a=1;</script><script>let b=2;</script>");
eval_with_js_min(b"<scRIPt type=text/plain> alert(1.00000); </scripT>", b"<script type=text/plain> alert(1.00000); </script>");
eval_with_js_min(br#"
<script>
// This is a comment.
let a = 1;
</script>
"#, b"<script>let a=1;</script>");
}
#[cfg(feature = "js-esbuild")]