Skip to content

Commit b8a4fc9

Browse files
committed
Reduce flakiness
1 parent f947828 commit b8a4fc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/user/type.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ test(
150150
await utils.injectHTML(`<textarea>1234</textarea>`);
151151
const input = await screen.getByRole('textbox');
152152
let startTime = Date.now();
153-
await user.type(input, '123');
154-
expect(Date.now() - startTime).toBeLessThan(100);
153+
await user.type(input, '1234567890');
154+
expect(Date.now() - startTime).toBeLessThan(200);
155155
startTime = Date.now();
156-
await user.type(input, '123', { delay: 50 });
157-
expect(Date.now() - startTime).toBeGreaterThan(150);
156+
await user.type(input, '1234567890', { delay: 100 });
157+
expect(Date.now() - startTime).toBeGreaterThan(1000);
158158
}),
159159
);
160160

0 commit comments

Comments
 (0)