diff --git a/crates/vite_path/src/relative.rs b/crates/vite_path/src/relative.rs index 271f9d5731..39f63228d0 100644 --- a/crates/vite_path/src/relative.rs +++ b/crates/vite_path/src/relative.rs @@ -323,6 +323,14 @@ mod tests { assert_eq!(rel_path.as_str(), "foo/bar"); } + #[test] + fn normalize_filenames() { + let rel_path = RelativePathBuf::new("foo").unwrap(); + assert_eq!(rel_path.as_str(), "foo"); + let rel_path = RelativePathBuf::new("foo.json").unwrap(); + assert_eq!(rel_path.as_str(), "foo.json"); + } + #[test] fn normalize_dots() { let rel_path = RelativePathBuf::new("./foo/./bar/.").unwrap();