apify-test-tools 0.5.5 → 0.5.7-beta.0
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.
- package/.github/scripts/before-beta-release.js +36 -0
- package/.github/workflows/_check_code.yaml +80 -0
- package/.github/workflows/_tests.yaml +35 -0
- package/.github/workflows/_update_release_metadata.yaml +86 -0
- package/.github/workflows/manual_publish_to_npm.yaml +51 -0
- package/.github/workflows/manual_release_stable.yaml +80 -0
- package/.github/workflows/on_master.yaml +56 -0
- package/.github/workflows/on_pull_request.yaml +25 -0
- package/dist/lib/lib.d.ts.map +1 -1
- package/dist/lib/lib.js +0 -1
- package/dist/lib/lib.js.map +1 -1
- package/dist/test/unit/custom-matchers.test.js +2 -1
- package/dist/test/unit/custom-matchers.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +30 -0
- package/knip.json +3 -0
- package/lib/lib.ts +0 -1
- package/package.json +54 -42
- package/test/unit/custom-matchers.test.ts +2 -1
- package/dist/test/unit/test-actor.test.d.ts +0 -2
- package/dist/test/unit/test-actor.test.d.ts.map +0 -1
- package/dist/test/unit/test-actor.test.js +0 -17
- package/dist/test/unit/test-actor.test.js.map +0 -1
|
@@ -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
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;
|
package/package.json
CHANGED
|
@@ -1,44 +1,56 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
2
|
+
"name": "apify-test-tools",
|
|
3
|
+
"version": "0.5.7-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "TBD",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/apify/apify-test-tools.git"
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18.0.0"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"apify-test-tools": "dist/bin/main.js"
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"main": "./dist/lib/lib.js",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@apify/consts": "^2.43.0",
|
|
20
|
+
"@slack/web-api": "^7.9.2",
|
|
21
|
+
"apify-client": "^2.22.2",
|
|
22
|
+
"yargs": "^18.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@apify/eslint-config": "^1.0.0",
|
|
26
|
+
"@apify/tsconfig": "^0.1.1",
|
|
27
|
+
"@types/node": "^24.0.0",
|
|
28
|
+
"@types/yargs": "^17.0.33",
|
|
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"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"vitest": ">=3.2.4"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"start": "npm run dist/bin/main.js",
|
|
44
|
+
"start:dev": "GITHUB_WORKSPACE=local-clone tsx bin/main.ts",
|
|
45
|
+
"build": "tsc && chmod +x ./dist/bin/main.js",
|
|
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"
|
|
53
|
+
},
|
|
54
|
+
"author": "oklinov",
|
|
55
|
+
"license": "ISC"
|
|
44
56
|
}
|
|
@@ -17,7 +17,8 @@ const PPE_EVENT_CONST = {
|
|
|
17
17
|
ADS_SCRAPED: 'ads-scraped',
|
|
18
18
|
} as const;
|
|
19
19
|
|
|
20
|
-
|
|
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();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-actor.test.d.ts","sourceRoot":"","sources":["../../../test/unit/test-actor.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { describe, testActor } from '../../lib/lib';
|
|
2
|
-
describe('testActor tests', async () => {
|
|
3
|
-
testActor('compass/google-maps-extractor', 'basic', async ({ expect, run }) => {
|
|
4
|
-
const runResult = await run({
|
|
5
|
-
input: {},
|
|
6
|
-
prefilledInput: true,
|
|
7
|
-
options: {
|
|
8
|
-
memory: 512,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
const input = await runResult.getInput();
|
|
12
|
-
await expect(runResult).toFinishWith({
|
|
13
|
-
datasetItemCount: input.maxCrawledPlacesPerSearch,
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=test-actor.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-actor.test.js","sourceRoot":"","sources":["../../../test/unit/test-actor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEpD,QAAQ,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;IACnC,SAAS,CAAC,+BAA+B,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;QAC1E,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC;YACxB,KAAK,EAAE,EAAE;YACT,cAAc,EAAE,IAAI;YACpB,OAAO,EAAE;gBACL,MAAM,EAAE,GAAG;aACd;SACJ,CAAC,CAAA;QACF,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAyC,CAAC;QAChF,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC;YACjC,gBAAgB,EAAE,KAAK,CAAC,yBAAyB;SACpD,CAAC,CAAA;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|