File tree Expand file tree Collapse file tree 1 file changed +0
-38
lines changed Expand file tree Collapse file tree 1 file changed +0
-38
lines changed Original file line number Diff line number Diff line change @@ -57,44 +57,6 @@ void main() {
57
57
});
58
58
});
59
59
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
-
98
60
group ('Integration' , () {
99
61
test ('should initialize with default config' , () async {
100
62
final tempDir = await Directory .systemTemp.createTemp ();
You can’t perform that action at this time.
0 commit comments