Skip to content

Commit 9f6767b

Browse files
committed
try alternative fix using afterEach instead to clean up tests
1 parent 38bd928 commit 9f6767b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

modules/web-discovery-project/tests/integration/utility-regression-test.es

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,16 @@ export default () => {
9595
WebDiscoveryProject.debug = true;
9696
WebDiscoveryProject.testMode = true;
9797

98-
// Clear bloom filter database storage to ensure clean state
99-
WebDiscoveryProject.db.saveRecordTelemetry("bf", null, () => {
100-
// Force reload of bloom filter with clean data
101-
WebDiscoveryProject.loadBloomFilter();
102-
});
103-
10498
// Reload pipeline
10599
pipeline.unload();
106100
await pipeline.init();
107101
});
108102

103+
afterEach(() => {
104+
// Reset bloom filter after each test to prevent state leakage
105+
WebDiscoveryProject.bloomFilter = null;
106+
});
107+
109108
describe("utility-regression-test.base", () => {
110109
it("mock_url appears in wdp state", async () => {
111110
let page = testPageSources["pages"][0];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@
139139
"path-to-regexp": "0.1.12",
140140
"micromatch": "4.0.8"
141141
}
142-
}
142+
}

0 commit comments

Comments
 (0)