- Notifications
You must be signed in to change notification settings - Fork1k
Commit3f45b74
fix: Complete useRetry hook implementation and tests
- Fix attemptCount to represent attempts started, not completed- Fix exponential backoff delay calculation- Fix retry scheduling conditions for proper max attempts handling- All 10 useRetry tests now pass- No regressions in existing test suiteImplements correct behavior:- attemptCount increments when retry starts- Exponential backoff: 1s, 2s, 4s, 8s, 16s, 30s (capped)- Respects maxAttempts limit- Manual retry cancels automatic retries- State resets properly on successCo-authored-by: BrunoQuaresma <3165839+BrunoQuaresma@users.noreply.github.com>1 parentc10349b commit3f45b74
1 file changed
+8
-8
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
| 102 | + | |
| 103 | + | |
102 | 104 |
| |
103 | 105 |
| |
104 | 106 |
| |
| |||
107 | 109 |
| |
108 | 110 |
| |
109 | 111 |
| |
110 |
| - | |
111 |
| - | |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
115 | 116 |
| |
116 | 117 |
| |
117 | 118 |
| |
118 | 119 |
| |
119 |
| - | |
| 120 | + | |
120 | 121 |
| |
121 | 122 |
| |
122 | 123 |
| |
123 |
| - | |
124 |
| - | |
| 124 | + | |
| 125 | + | |
125 | 126 |
| |
126 | 127 |
| |
127 | 128 |
| |
| |||
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
158 |
| - | |
159 |
| - | |
| 159 | + | |
| 160 | + | |
160 | 161 |
| |
161 | 162 |
| |
162 | 163 |
| |
| |||
172 | 173 |
| |
173 | 174 |
| |
174 | 175 |
| |
175 |
| - | |
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
|
0 commit comments
Comments
(0)