Skip to content

Commit

Permalink
chore: unflake 'should record' (#32880)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Sep 30, 2024
1 parent 6f99d48 commit 6f16b6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ export class RecorderCollection extends EventEmitter {
}

private _fireChange() {
if (!this._enabled)
return;
this.emit('change', collapseActions(this._actions));
}
}
2 changes: 1 addition & 1 deletion tests/library/debug-controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ test('test', async ({ page }) => {
await page.getByRole('button', { name: 'Submit' }).click();
});`
});
const length = events.length;
// No events after mode disabled
await backend.setRecorderMode({ mode: 'none' });
const length = events.length;
await page.getByRole('button').click();
expect(events).toHaveLength(length);
});
Expand Down

0 comments on commit 6f16b6c

Please sign in to comment.