Commit e365629
committed
test(json): add Windows file readability delay after save operations
Add waitForFile() helper that adds a 50ms delay on Windows after save()
operations to ensure the file is readable before attempting to read it. This
addresses a test-level race condition where tests were failing intermittently
because they tried to read files immediately after writing, before Windows
had made them accessible.
Updated tests:
- should preserve line endings
- should support sort option
- should use default 2-space indent for new files
This complements the production code fix in retryWrite() by also ensuring
tests don't race against filesystem operations.1 parent e3ada12 commit e365629
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
764 | 771 | | |
765 | 772 | | |
766 | 773 | | |
| |||
1070 | 1077 | | |
1071 | 1078 | | |
1072 | 1079 | | |
| 1080 | + | |
1073 | 1081 | | |
1074 | 1082 | | |
1075 | 1083 | | |
| |||
1091 | 1099 | | |
1092 | 1100 | | |
1093 | 1101 | | |
| 1102 | + | |
1094 | 1103 | | |
1095 | 1104 | | |
1096 | 1105 | | |
| |||
1116 | 1125 | | |
1117 | 1126 | | |
1118 | 1127 | | |
| 1128 | + | |
1119 | 1129 | | |
1120 | 1130 | | |
1121 | 1131 | | |
| |||
0 commit comments