From 58af4dc722275907215d4089761bda5f9cb4fc43 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 22 Nov 2023 16:32:38 +0000 Subject: [PATCH 1/2] Enable file watcher tests on Windows --- test/file_watcher/polling_test.dart | 3 --- test/ready/shared.dart | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) 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/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 @@ void sharedTests() { 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). From 3b0ce99ed677c9337419fd6e548d9e452e96c53b Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 22 Nov 2023 16:34:00 +0000 Subject: [PATCH 2/2] Add additional test --- test/file_watcher/shared.dart | 5 +++++ 1 file changed, 5 insertions(+) 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 @@ void sharedTests() { await Future.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'); + }); }