Skip to content

Commit 2240c60

Browse files
committed
tests: remove non-predictive test
1 parent ce1f820 commit 2240c60

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

test/hmr_test.dart

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -57,44 +57,6 @@ void main() {
5757
});
5858
});
5959

60-
group('Watcher', () {
61-
late Directory testDir;
62-
Watcher? watcher;
63-
64-
setUp(() async {
65-
testDir = Directory(path.join(Directory.current.path, 'test_temp'));
66-
await testDir.create(recursive: true);
67-
});
68-
69-
tearDown(() async {
70-
await testDir.delete(recursive: true);
71-
watcher?.dispose(); // Dispose le watcher après chaque test
72-
});
73-
74-
test('should detect file modifications', () async {
75-
final completer = Completer<void>();
76-
watcher = Watcher(
77-
includes: [Glob('${testDir.path}/**')],
78-
onFileModify: (file) {
79-
if (!completer.isCompleted) {
80-
completer.complete();
81-
}
82-
},
83-
);
84-
85-
watcher?.watch();
86-
87-
final file = File(path.join(testDir.path, 'test.txt'));
88-
await file.create();
89-
90-
await Future.delayed(const Duration(milliseconds: 100));
91-
await file.writeAsString('modified');
92-
93-
await completer.future.timeout(const Duration(seconds: 2));
94-
expect(completer.isCompleted, isTrue);
95-
});
96-
});
97-
9860
group('Integration', () {
9961
test('should initialize with default config', () async {
10062
final tempDir = await Directory.systemTemp.createTemp();

0 commit comments

Comments
 (0)