Fix async assertions in test files (#1510)
* fix: await assertSnapshot in test files for async assertions
This commit is contained in:
@@ -87,7 +87,7 @@ describe('rrweb-plugin-console-record', () => {
|
||||
'window.snapshots',
|
||||
)) as eventWithTime[];
|
||||
// The snapshots should containe 1 console log, not multiple.
|
||||
assertSnapshot(snapshots);
|
||||
await assertSnapshot(snapshots);
|
||||
});
|
||||
|
||||
it('should record console messages', async () => {
|
||||
@@ -123,6 +123,6 @@ describe('rrweb-plugin-console-record', () => {
|
||||
const snapshots = (await page.evaluate(
|
||||
'window.snapshots',
|
||||
)) as eventWithTime[];
|
||||
assertSnapshot(snapshots);
|
||||
await assertSnapshot(snapshots);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user