mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 05:34:49 +00:00
added mjs files for default fmt (#6134)
This commit is contained in:
parent
79d9cf52d0
commit
93175b7a79
1 changed files with 3 additions and 1 deletions
|
@ -193,7 +193,7 @@ fn is_supported(path: &Path) -> bool {
|
||||||
.and_then(|e| e.to_str())
|
.and_then(|e| e.to_str())
|
||||||
.map(|e| e.to_lowercase());
|
.map(|e| e.to_lowercase());
|
||||||
if let Some(ext) = lowercase_ext {
|
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 {
|
} else {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,8 @@ fn test_is_supported() {
|
||||||
assert!(is_supported(Path::new("foo.TSX")));
|
assert!(is_supported(Path::new("foo.TSX")));
|
||||||
assert!(is_supported(Path::new("foo.JS")));
|
assert!(is_supported(Path::new("foo.JS")));
|
||||||
assert!(is_supported(Path::new("foo.JSX")));
|
assert!(is_supported(Path::new("foo.JSX")));
|
||||||
|
assert!(is_supported(Path::new("foo.mjs")));
|
||||||
|
assert!(!is_supported(Path::new("foo.mjsx")));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue