Skip to content

Commit 5fd4bd5

Browse files
eslint resolved, run test from root
1 parent ec02245 commit 5fd4bd5

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

packages/actor-scraper/sitemap-scraper/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"start": "npm run start:dev",
2525
"start:prod": "node dist/main.js",
2626
"start:dev": "tsx src/main.ts",
27-
"build": "tsc",
28-
"test": "vitest run --config ../../../vitest.config.mts test"
27+
"build": "tsc"
2928
},
3029
"repository": {
3130
"type": "git",

packages/actor-scraper/sitemap-scraper/src/internals/consts.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {
22
Dictionary,
3-
ProxyConfigurationOptions,
3+
ProxyConfigurationOptions as CrawleeProxyConfigurationOptions,
44
RequestOptions,
55
} from '@crawlee/http';
66

@@ -10,6 +10,10 @@ export const enum ProxyRotation {
1010
UntilFailure = 'UNTIL_FAILURE',
1111
}
1212

13+
type ProxyConfigurationOptions = CrawleeProxyConfigurationOptions & {
14+
useApifyProxy?: boolean;
15+
};
16+
1317
/**
1418
* Replicates the INPUT_SCHEMA with JavaScript types for quick reference
1519
* and IDE type check integration.

packages/actor-scraper/sitemap-scraper/test/crawler-setup.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2-
31
import { log } from '@crawlee/http';
2+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
43

5-
import type { Input } from '../src/internals/consts.js';
6-
import { ProxyRotation } from '../src/internals/consts.js';
4+
import { type Input, ProxyRotation } from '../src/internals/consts.js';
75
import { CrawlerSetup } from '../src/internals/crawler_setup.js';
86

97
vi.mock('apify', () => ({
@@ -47,9 +45,10 @@ describe('CrawlerSetup', () => {
4745
it('sets debug log level when debugLog is true', async () => {
4846
const setLevelSpy = vi.spyOn(log, 'setLevel');
4947

50-
new CrawlerSetup(createInput({ debugLog: true }));
48+
const setup = new CrawlerSetup(createInput({ debugLog: true }));
5149

5250
expect(setLevelSpy).toHaveBeenCalledWith(log.LEVELS.DEBUG);
51+
expect(setup).toBeInstanceOf(CrawlerSetup);
5352
});
5453

5554
it('stores rawInput as a JSON string', async () => {

0 commit comments

Comments
 (0)