Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4621,13 +4621,6 @@ mod tests {
assert!(!parses_with_decorator_as("export @dec class A {}", SourceType::d_ts()));
}

#[cfg(not(windows))]
#[test]
fn non_windows_behavior_is_unchanged() {
assert_eq!(file_url_to_path("file:///a/b.ts"), Some(PathBuf::from("/a/b.ts")));
assert_eq!(file_url_to_path("file:///a%20b.ts"), Some(PathBuf::from("/a b.ts")));
}

// Expected strings below are what Node's `pathToFileURL` writes for the
// same path (issue #837).
#[test]
Expand Down
18 changes: 0 additions & 18 deletions src/windows_file_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,16 +639,6 @@ mod tests {
// `file:///C:/…` form. The module is compiled into test builds on every
// platform, so these run wherever `cargo test` does.

#[test]
fn windows_drive_url_parses() {
assert_eq!(url_to_path("file:///C:/a/b.ts"), Some(PathBuf::from("C:/a/b.ts")));
}

#[test]
fn windows_drive_path_generates() {
assert_eq!(path_to_url("C:\\a\\b.ts"), "file:///C:/a/b.ts");
}

// Issue #837: the drive form is percent-encoded like `pathToFileURL`
// writes it, while the drive letter keeps its case and its `:`.
#[test]
Expand All @@ -668,14 +658,6 @@ mod tests {
}
}

#[test]
fn windows_unc_url_parses_to_unc_path() {
assert_eq!(
url_to_path("file://server/share/dir/module.ts"),
Some(PathBuf::from("\\\\server\\share\\dir\\module.ts"))
);
}

#[test]
fn windows_unc_url_without_path_parses_to_server_root() {
assert_eq!(url_to_path("file://server"), Some(PathBuf::from("\\\\server\\")));
Expand Down
Loading