Skip to content

Commit 7a03ef8

Browse files
committed
fix(pat-scroll-box): Fix failing tests due to timing inconsitencies.
1 parent 597f869 commit 7a03ef8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/pat/scroll-box/scroll-box.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ describe("pat-scroll-box", function () {
103103
// scroll-up and scroll-down are not cleared.
104104

105105
// Still there...
106-
await utils.timeout(custom_timeout / 2);
106+
await utils.timeout(1);
107107
expect(el.classList).toContain("scrolling-up");
108108
// Now gone
109-
await utils.timeout(custom_timeout / 2 + 1);
109+
await utils.timeout(custom_timeout + 1);
110110
expect(el.classList).not.toContain("scrolling-up");
111111

112112
el.scrollTop = 100;
@@ -121,10 +121,10 @@ describe("pat-scroll-box", function () {
121121

122122
// Test for clearing the scrolling classes after a scroll stop
123123
// Still there...
124-
await utils.timeout(custom_timeout / 2);
124+
await utils.timeout(1);
125125
expect(el.classList).toContain("scrolling-down");
126126
// Now gone
127-
await utils.timeout(custom_timeout / 2 + 1);
127+
await utils.timeout(custom_timeout + 1);
128128
expect(el.classList).not.toContain("scrolling-down");
129129
});
130130
});

0 commit comments

Comments
 (0)