1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-26 16:09:27 -05:00

added mjs files for default fmt (#6134)

This commit is contained in:
Taisuke Fukuno 2020-06-06 12:36:50 +09:00 committed by GitHub
parent 79d9cf52d0
commit 93175b7a79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,7 +193,7 @@ fn is_supported(path: &Path) -> bool {
.and_then(|e| e.to_str())
.map(|e| e.to_lowercase());
if let Some(ext) = lowercase_ext {
ext == "ts" || ext == "tsx" || ext == "js" || ext == "jsx"
ext == "ts" || ext == "tsx" || ext == "js" || ext == "jsx" || ext == "mjs"
} else {
false
}
@ -293,6 +293,8 @@ fn test_is_supported() {
assert!(is_supported(Path::new("foo.TSX")));
assert!(is_supported(Path::new("foo.JS")));
assert!(is_supported(Path::new("foo.JSX")));
assert!(is_supported(Path::new("foo.mjs")));
assert!(!is_supported(Path::new("foo.mjsx")));
}
#[tokio::test]