mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-30 16:30:09 +02:00
♻️ Refactor file watchers
This commit is contained in:
@@ -41,10 +41,6 @@ struct FSNotifierTest {
|
||||
}
|
||||
)
|
||||
|
||||
defer {
|
||||
notifier.terminate()
|
||||
}
|
||||
|
||||
// Modify the file, twice
|
||||
try "hello".write(to: testFile, atomically: false, encoding: .utf8)
|
||||
try "hello".write(to: testFile, atomically: false, encoding: .utf8)
|
||||
@@ -59,5 +55,8 @@ struct FSNotifierTest {
|
||||
// Verify after another second, our second write is actually noted
|
||||
await delay(seconds: 1.2)
|
||||
#expect(eventFired.value == 2)
|
||||
|
||||
// Clean up notifier
|
||||
notifier.terminate()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user