Skip to content

Commit 75e0908

Browse files
committed
chore: bump vitest to beta, fix failing ALS tests
1 parent 2c810aa commit 75e0908

File tree

3 files changed

+383
-282
lines changed

3 files changed

+383
-282
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"typescript": "^5.8.3",
118118
"typescript-eslint": "^8.32.0",
119119
"vite-tsconfig-paths": "^5.1.4",
120-
"vitest": "^4.0.1"
120+
"vitest": "^4.1.0-beta.6"
121121
},
122122
"lint-staged": {
123123
"**/*.{js,ts,mjs,mts,cjs,cts,json,css}": "biome format --write --no-errors-on-unmatched"

test/core/crawlers/browser_crawler.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Server } from 'node:http';
22

33
import { BROWSER_POOL_EVENTS, OperatingSystemsName, PuppeteerPlugin } from '@crawlee/browser-pool';
4-
import { BLOCKED_STATUS_CODES } from '@crawlee/core';
4+
import { bindMethodsToServiceLocator, BLOCKED_STATUS_CODES, ServiceLocator } from '@crawlee/core';
55
import type { PuppeteerGoToOptions } from '@crawlee/puppeteer';
66
import { EnqueueStrategy, ProxyConfiguration, Request, RequestList, RequestState, Session } from '@crawlee/puppeteer';
77
import { sleep } from '@crawlee/utils';
@@ -40,6 +40,12 @@ describe('BrowserCrawler', () => {
4040
server.close();
4141
});
4242

43+
aroundEach(async (t) => {
44+
const { run } = bindMethodsToServiceLocator(new ServiceLocator(), {});
45+
46+
await run(t);
47+
});
48+
4349
test.concurrent('should work', async () => {
4450
const localStorageEmulator = new MemoryStorageEmulator();
4551
await localStorageEmulator.init();

0 commit comments

Comments
 (0)