Enable file watcher tests on Windows (#156)
* Enable file watcher tests on Windows
* Add additional test
diff --git a/test/file_watcher/polling_test.dart b/test/file_watcher/polling_test.dart
index 6f2bfbc..861fcb2 100644
--- a/test/file_watcher/polling_test.dart
+++ b/test/file_watcher/polling_test.dart
@@ -2,9 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@TestOn('linux || mac-os')
-library;
-
import 'package:test/test.dart';
import 'package:watcher/watcher.dart';
diff --git a/test/file_watcher/shared.dart b/test/file_watcher/shared.dart
index 1e1718f..081b92e 100644
--- a/test/file_watcher/shared.dart
+++ b/test/file_watcher/shared.dart
@@ -65,4 +65,9 @@
await Future<void>.delayed(const Duration(milliseconds: 10));
await sub.cancel();
});
+
+ test('ready completes even if file does not exist', () async {
+ // startWatcher awaits 'ready'
+ await startWatcher(path: 'foo/bar/baz');
+ });
}
diff --git a/test/ready/shared.dart b/test/ready/shared.dart
index c1b47ad..ab2c3e1 100644
--- a/test/ready/shared.dart
+++ b/test/ready/shared.dart
@@ -69,7 +69,7 @@
expect(watcher.ready, doesNotComplete);
});
- test('completes even if directory does not exist', () async {
+ test('ready completes even if directory does not exist', () async {
var watcher = createWatcher(path: 'does/not/exist');
// Subscribe to the events (else ready will never fire).