@@ -20,13 +20,25 @@ void linkTests({required bool isNative}) {
2020 test ('notifies when a link is overwritten with an identical file' , () async {
2121 await startWatcher (path: 'link.txt' );
2222 writeFile ('link.txt' );
23- await expectModifyEvent ('link.txt' );
23+
24+ // TODO(davidmorgan): reconcile differences.
25+ if (isNative) {
26+ await expectNoEvents ();
27+ } else {
28+ await expectModifyEvent ('link.txt' );
29+ }
2430 });
2531
2632 test ('notifies when a link is overwritten with a different file' , () async {
2733 await startWatcher (path: 'link.txt' );
2834 writeFile ('link.txt' , contents: 'modified' );
29- await expectModifyEvent ('link.txt' );
35+
36+ // TODO(davidmorgan): reconcile differences.
37+ if (isNative) {
38+ await expectNoEvents ();
39+ } else {
40+ await expectModifyEvent ('link.txt' );
41+ }
3042 });
3143
3244 test (
@@ -35,25 +47,15 @@ void linkTests({required bool isNative}) {
3547 await startWatcher (path: 'link.txt' );
3648 writeFile ('target.txt' );
3749
38- // TODO(davidmorgan): reconcile differences.
39- if (isNative) {
40- await expectModifyEvent ('link.txt' );
41- } else {
42- await expectNoEvents ();
43- }
50+ await expectModifyEvent ('link.txt' );
4451 },
4552 );
4653
4754 test ('notifies when a link target is modified' , () async {
4855 await startWatcher (path: 'link.txt' );
4956 writeFile ('target.txt' , contents: 'modified' );
5057
51- // TODO(davidmorgan): reconcile differences.
52- if (isNative) {
53- await expectModifyEvent ('link.txt' );
54- } else {
55- await expectNoEvents ();
56- }
58+ await expectModifyEvent ('link.txt' );
5759 });
5860
5961 test ('notifies when a link is removed' , () async {
@@ -79,21 +81,11 @@ void linkTests({required bool isNative}) {
7981
8082 writeFile ('target.txt' , contents: 'modified' );
8183
82- // TODO(davidmorgan): reconcile differences.
83- if (isNative) {
84- await expectModifyEvent ('link.txt' );
85- } else {
86- await expectNoEvents ();
87- }
84+ await expectModifyEvent ('link.txt' );
8885
8986 writeFile ('target.txt' , contents: 'modified again' );
9087
91- // TODO(davidmorgan): reconcile differences.
92- if (isNative) {
93- await expectModifyEvent ('link.txt' );
94- } else {
95- await expectNoEvents ();
96- }
88+ await expectModifyEvent ('link.txt' );
9789 });
9890
9991 test ('notifies when a link is moved away' , () async {
@@ -145,24 +137,14 @@ void linkTests({required bool isNative}) {
145137 writeFile ('old.txt' );
146138 renameFile ('old.txt' , 'target.txt' );
147139
148- // TODO(davidmorgan): reconcile differences.
149- if (isNative) {
150- await expectModifyEvent ('link.txt' );
151- } else {
152- await expectNoEvents ();
153- }
140+ await expectModifyEvent ('link.txt' );
154141 });
155142
156143 test ('notifies when a different file is moved over the target' , () async {
157144 await startWatcher (path: 'link.txt' );
158145 writeFile ('old.txt' , contents: 'modified' );
159146 renameFile ('old.txt' , 'target.txt' );
160147
161- // TODO(davidmorgan): reconcile differences.
162- if (isNative) {
163- await expectModifyEvent ('link.txt' );
164- } else {
165- await expectNoEvents ();
166- }
148+ await expectModifyEvent ('link.txt' );
167149 });
168150}
0 commit comments