Skip to content

Commit

Permalink
Tweaks to timings to get tests passing on my dev laptop - hopefully t…
Browse files Browse the repository at this point in the history
…his makes tests more deterministic
  • Loading branch information
eoghanmurray committed Jan 20, 2021
1 parent 4a73f6d commit 10842b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/record.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ interface IWindow extends Window {
}

describe('record', function (this: ISuite) {
this.timeout(10_000);

before(async () => {
this.browser = await launchPuppeteer();

Expand Down Expand Up @@ -138,7 +140,7 @@ describe('record', function (this: ISuite) {
while (count--) {
await this.page.type('input', 'a');
}
await this.page.waitFor(500);
await this.page.waitFor(300); // originally 500, but that was resulting in this.events.length==35 on a slower test env
expect(this.events.length).to.equal(33);
await this.page.type('input', 'a');
await this.page.waitFor(10);
Expand Down Expand Up @@ -223,7 +225,7 @@ describe('record', function (this: ISuite) {
styleSheet.insertRule('body { color: #ccc; }');
}, 10);
});
await this.page.waitFor(10);
await this.page.waitFor(50);
const styleSheetRuleEvents = this.events.filter(
(e) =>
e.type === EventType.IncrementalSnapshot &&
Expand Down

0 comments on commit 10842b4

Please sign in to comment.