apify-test-tools 0.5.4 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ import prettier from 'eslint-config-prettier';
2
+
3
+ import apify from '@apify/eslint-config/ts.js';
4
+ import globals from 'globals';
5
+ import tsEslint from 'typescript-eslint';
6
+
7
+ // eslint-disable-next-line import/no-default-export
8
+ export default [
9
+ { ignores: ['**/dist', 'eslint.config.mjs'] },
10
+ ...apify,
11
+ prettier,
12
+ {
13
+ languageOptions: {
14
+ parser: tsEslint.parser,
15
+ parserOptions: {
16
+ project: 'tsconfig.json',
17
+ },
18
+ globals: {
19
+ ...globals.node,
20
+ ...globals.jest,
21
+ },
22
+ },
23
+ plugins: {
24
+ '@typescript-eslint': tsEslint.plugin,
25
+ },
26
+ rules: {
27
+ 'no-console': 0,
28
+ },
29
+ },
30
+ ];
package/knip.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json"
3
+ }
package/lib/lib.ts CHANGED
@@ -191,7 +191,6 @@ const createStandbyTask = async (actorNameOrId: string, buildNumber?: string): P
191
191
  throw new Error(`Actor "${actorNameOrId} doesn't contain actorStandby options`);
192
192
  }
193
193
  const { isEnabled, ...defaultActorStandby } = actorInfo.actorStandby;
194
- // @ts-expect-error This is not typed properly in ApifyClient, we need to remove it or API fails
195
194
  delete defaultActorStandby.disableStandbyFieldsOverride
196
195
 
197
196
  const build = buildNumber ?? defaultActorStandby.build;
@@ -253,7 +252,7 @@ const createStartRunFn = <T>(actorNameOrId: string, testContext: TestContext) =>
253
252
  ...(prefilledInput && (await getActorPrefilledInput(apifyClient, actorNameOrId, buildId))),
254
253
  ...input,
255
254
  };
256
- const run = await actor.call(actorInput, { build, ...options });
255
+ const run = await actor.call(actorInput, { build, log: null, ...options });
257
256
 
258
257
  const runLink = generateRunLink(run);
259
258
  await annotate(`${task.name} - ${runLink}`, 'run_link');
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "apify-test-tools",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "type": "module",
5
5
  "description": "TBD",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/apify/apify-test-tools.git"
9
+ },
6
10
  "engines": {
7
11
  "node": ">=18.0.0"
8
12
  },
@@ -14,19 +18,23 @@
14
18
  "dependencies": {
15
19
  "@apify/consts": "^2.43.0",
16
20
  "@slack/web-api": "^7.9.2",
17
- "apify-client": "^2.12.6",
21
+ "apify-client": "^2.22.2",
18
22
  "yargs": "^18.0.0"
19
23
  },
20
24
  "devDependencies": {
21
- "@apify/eslint-config-ts": "^0.3.0",
22
- "@apify/tsconfig": "^0.1.0",
25
+ "@apify/eslint-config": "^1.0.0",
26
+ "@apify/tsconfig": "^0.1.1",
27
+ "@types/node": "^24.0.0",
23
28
  "@types/yargs": "^17.0.33",
24
- "@typescript-eslint/eslint-plugin": "^6.7.2",
25
- "@typescript-eslint/parser": "^6.7.2",
26
- "eslint": "^8.50.0",
27
- "tsx": "^4.19.2",
28
- "typescript": "^5.7",
29
- "vitest": "^3.2.4"
29
+ "eslint": "^9.29.0",
30
+ "eslint-config-prettier": "^10.1.5",
31
+ "globals": "^17.0.0",
32
+ "prettier": "^3.5.3",
33
+ "tsx": "^4.20.3",
34
+ "typescript": "^5.9.3",
35
+ "typescript-eslint": "^8.34.1",
36
+ "vitest": "^3.2.4",
37
+ "knip": "^5.65.0"
30
38
  },
31
39
  "peerDependencies": {
32
40
  "vitest": ">=3.2.4"
@@ -35,9 +43,13 @@
35
43
  "start": "npm run dist/bin/main.js",
36
44
  "start:dev": "GITHUB_WORKSPACE=local-clone tsx bin/main.ts",
37
45
  "build": "tsc && chmod +x ./dist/bin/main.js",
38
- "lint": "eslint ./src --ext .ts",
39
- "lint:fix": "eslint ./src --ext .ts --fix",
40
- "test": "vitest run"
46
+ "lint": "eslint",
47
+ "lint:fix": "eslint --fix",
48
+ "format": "prettier --write .",
49
+ "format:check": "prettier --check .",
50
+ "type-check": "tsc --noEmit",
51
+ "test": "vitest run",
52
+ "check-unused": "npx knip"
41
53
  },
42
54
  "author": "oklinov",
43
55
  "license": "ISC"
@@ -17,7 +17,8 @@ const PPE_EVENT_CONST = {
17
17
  ADS_SCRAPED: 'ads-scraped',
18
18
  } as const;
19
19
 
20
- describe('custom-matchers', { timeout: 100_000 }, () => {
20
+ // TODO: Remake these tests. k5MNKmaDGHlABDn2I run doesn't exist and we probably don't want to depend on fixed run
21
+ describe.skip('custom-matchers', { timeout: 100_000 }, () => {
21
22
  testTestActor('basic', async ({ expect }) => {
22
23
  const apifyClient = new ApifyClient({ token: process.env.TESTER_APIFY_TOKEN });
23
24
  const run = await apifyClient.run('k5MNKmaDGHlABDn2I').get();