Skip to content

Commit 16bde28

Browse files
committed
Fix loops in TimeZone tests
These tests called getNextTransition() and getPreviousTransition() four times on the same instant, instead of chaining four calls.
1 parent 4cc1780 commit 16bde28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

polyfill/test/timezone.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,14 @@ describe('TimeZone', () => {
209209
for (let i = 0, txn = inst; i < 4; i++) {
210210
const transition = zone.getNextTransition(txn);
211211
assert(transition);
212+
txn = transition;
212213
}
213214
});
214215
it(`(${zone}).getPreviousTransition() x 4 transitions`, () => {
215216
for (let i = 0, txn = inst; i < 4; i++) {
216217
const transition = zone.getPreviousTransition(txn);
217218
assert(transition);
219+
txn = transition;
218220
}
219221
});
220222
});

0 commit comments

Comments
 (0)