Skip to content

Commit 61fa2a7

Browse files
committed
test: ensure restore fetch in beforeEach also
1 parent c61f8c9 commit 61fa2a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/helper.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ beforeAll(async () => {
222222
Parse.CoreManager.set('REQUEST_ATTEMPT_LIMIT', 1);
223223
});
224224

225+
beforeEach(async () => {
226+
if(fetchWasMocked) {
227+
global.restoreFetch();
228+
}
229+
});
230+
225231
global.afterEachFn = async () => {
226232
// Restore fetch to prevent mock pollution between tests (only if it was mocked)
227233
if (fetchWasMocked) {

0 commit comments

Comments
 (0)