Skip to content

Commit 9a1e599

Browse files
committed
Remove bad watch ignore test. No longer needed due to new path matching using globs.
1 parent 9c4a3a0 commit 9a1e599

File tree

3 files changed

+3
-34
lines changed

3 files changed

+3
-34
lines changed

src/config/models/test.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,6 @@ async fn err_bad_trunk_toml_watch_path() {
5656
);
5757
}
5858

59-
#[cfg(not(target_family = "windows"))]
60-
#[tokio::test]
61-
async fn err_bad_trunk_toml_watch_ignore() {
62-
let cwd = std::env::current_dir().expect("error getting cwd");
63-
let path = cwd.join("tests").join("data").join("bad-watch-ignore.toml");
64-
let (cfg, working_directory) = load(Some(path)).await.expect("expected config to parse");
65-
let err = RtcWatch::from_config(cfg, working_directory, |_, core| WatchOptions {
66-
build: BuildOptions {
67-
core,
68-
inject_autoloader: false,
69-
},
70-
poll: None,
71-
enable_cooldown: false,
72-
clear_screen: false,
73-
no_error_reporting: false,
74-
})
75-
.await
76-
.expect_err("expected config to err");
77-
assert_eq!(
78-
err.to_string(),
79-
format!(
80-
r#"error taking the canonical path to the watch ignore path: "{}/tests/data/fake.html""#,
81-
cwd.display()
82-
)
83-
);
84-
}
85-
8659
async fn assert_trunk_version(
8760
path: impl AsRef<Path>,
8861
expected_version: VersionReq,

src/watch.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ impl WatchSystem {
329329

330330
// SAFETY: All previous patterns are valid, and so is
331331
// the new one being added, so this should never panic.
332-
self.ignored_paths.add(path).expect("all patterns to be valid");
332+
self.ignored_paths
333+
.add(path)
334+
.expect("all patterns to be valid");
333335
}
334336
}
335337

tests/data/bad-watch-ignore.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)