Flaky file watching tests, add debug assertions (#12587)

This commit is contained in:
Micha Reiser 2024-07-30 20:09:55 +02:00 committed by GitHub
parent adc8d4e1e7
commit 18f87b9497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -240,7 +240,7 @@ impl Debouncer {
} }
ModifyKind::Data(_) => ChangeEvent::Changed { ModifyKind::Data(_) => ChangeEvent::Changed {
kind: ChangedKind::FileMetadata, kind: ChangedKind::FileContent,
path, path,
}, },

View file

@ -265,6 +265,8 @@ fn changed_file() -> anyhow::Result<()> {
let changes = case.stop_watch(); let changes = case.stop_watch();
assert!(!changes.is_empty());
case.db_mut().apply_changes(changes); case.db_mut().apply_changes(changes);
assert_eq!(source_text(case.db(), foo).as_str(), "print('Version 2')"); assert_eq!(source_text(case.db(), foo).as_str(), "print('Version 2')");