Skip to content

Commit e826e96

Browse files
authored
Enable file watcher tests on Windows (dart-archive/watcher#156)
* Enable file watcher tests on Windows * Add additional test
1 parent 26eae9d commit e826e96

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

pkgs/watcher/test/file_watcher/polling_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
@TestOn('linux || mac-os')
6-
library;
7-
85
import 'package:test/test.dart';
96
import 'package:watcher/watcher.dart';
107

pkgs/watcher/test/file_watcher/shared.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ void sharedTests() {
6565
await Future<void>.delayed(const Duration(milliseconds: 10));
6666
await sub.cancel();
6767
});
68+
69+
test('ready completes even if file does not exist', () async {
70+
// startWatcher awaits 'ready'
71+
await startWatcher(path: 'foo/bar/baz');
72+
});
6873
}

pkgs/watcher/test/ready/shared.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void sharedTests() {
6969
expect(watcher.ready, doesNotComplete);
7070
});
7171

72-
test('completes even if directory does not exist', () async {
72+
test('ready completes even if directory does not exist', () async {
7373
var watcher = createWatcher(path: 'does/not/exist');
7474

7575
// Subscribe to the events (else ready will never fire).

0 commit comments

Comments
 (0)