v0.25.1
This commit is contained in:
1 parent
87e571c170
commit
fa7abc9e53
308 files changed
+49746
-50237
No files matched your search
+1
-18
@@ -120,21 +120,4 @@ pub fn minify(body: &[u8]) -> Result<Vec<u8>> {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn keeps_regex_literals_and_asi_sensitive_newlines() {
|
||||
let input = b"const r = /a b[/*]/; // keep\nreturn value;\n";
|
||||
let output = String::from_utf8(minify(input).unwrap()).unwrap();
|
||||
assert!(output.contains("/a b[/*]/; // keep"));
|
||||
assert!(output.contains("return value"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn keeps_template_literal_whitespace() {
|
||||
let input = b"const x = `a b ${ value }`;\n";
|
||||
let output = String::from_utf8(minify(input).unwrap()).unwrap();
|
||||
assert_eq!(output, "const x = `a b ${ value }`;\n");
|
||||
}
|
||||
}
|
||||
include!("js/tests.rs");
|
||||
Reference in new issue
Block a user