Skip to content

Commit 17e1f68

Browse files
Lightning00BladeOrKoN
authored andcommitted
fix
1 parent aec0bce commit 17e1f68

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/PageCollector.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export class PageCollector<T> {
5656
if (!page) {
5757
return;
5858
}
59+
console.log('destro');
5960
this.#cleanupPageDestroyed(page);
6061
});
6162
}

tests/PageCollector.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ function mockListener() {
2323
listeners[eventName] = [listener];
2424
}
2525
},
26+
off(_eventName: string, _listener: (data: unknown) => void) {
27+
// no-op
28+
},
2629
emit(eventName: string, data: unknown) {
2730
for (const listener of listeners[eventName] ?? []) {
2831
listener(data);
@@ -165,7 +168,7 @@ describe('PageCollector', () => {
165168
assert.equal(collector.getData(page).length, 2);
166169
});
167170

168-
it.only('should clear data on page destroy', async () => {
171+
it('should clear data on page destroy', async () => {
169172
const browser = getMockBrowser();
170173
const page = (await browser.pages())[0];
171174
const request = getMockRequest();

0 commit comments

Comments
 (0)