apify-test-tools 0.10.2-beta.16 → 0.10.2-beta.17
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/cli/apify-test-tools.mjs +25 -25
- package/CHANGELOG.md +1 -0
- package/bin/actor-ids.ts +11 -8
- package/bin/run-tests.ts +2 -1
- package/dist/bin/actor-ids.d.ts +5 -6
- package/dist/bin/actor-ids.d.ts.map +1 -1
- package/dist/bin/actor-ids.js +9 -3
- package/dist/bin/actor-ids.js.map +1 -1
- package/dist/bin/run-tests.d.ts.map +1 -1
- package/dist/bin/run-tests.js +1 -1
- package/dist/bin/run-tests.js.map +1 -1
- package/dist/test/unit/bin/actor-ids.test.js +11 -3
- package/dist/test/unit/bin/actor-ids.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/cli.md +4 -3
- package/package.json +1 -1
- package/test/unit/bin/actor-ids.test.ts +11 -7
package/docs/cli.md
CHANGED
|
@@ -296,9 +296,10 @@ The input is a JSON array of Actors, each given by its full name, its raw ID or
|
|
|
296
296
|
with it (`buildId` and `buildNumber`, as `build` and `build-from-local` print them), or against its default build
|
|
297
297
|
without one. Other fields are ignored, so the output of [`get-actor-configs`](#listing-actors-get-actor-configs) works
|
|
298
298
|
as it is. `test` looks up the ID an Actor is listed without with `TESTER_APIFY_TOKEN`, so its tests run whichever ID
|
|
299
|
-
they name it by.
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
they name it by. An Actor the token can't see keeps only the ID it was listed with, and a warning names it, so an
|
|
300
|
+
Actor no test uses doesn't stop the run. A dry-run plan, empty or invalid input is an error, as with `build`. So is a
|
|
301
|
+
missing `TESTER_APIFY_TOKEN`: without it the lib skips every platform test, and the run would pass having tested
|
|
302
|
+
nothing. `test` passes the Actors to vitest as `ACTOR_BUILDS`, in place of any
|
|
302
303
|
`ACTOR_BUILDS` in its own environment.
|
|
303
304
|
|
|
304
305
|
It runs vitest with `--maxConcurrency=20 --fileParallelism --maxWorkers=100`, since platform tests mostly wait on
|
package/package.json
CHANGED
|
@@ -32,12 +32,16 @@ describe('withActorIds', () => {
|
|
|
32
32
|
expect(client.actor).not.toHaveBeenCalled();
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
it('
|
|
36
|
-
|
|
37
|
-
'
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
35
|
+
it('keeps an Actor the token cannot see as listed, instead of failing the run', async () => {
|
|
36
|
+
const targets = [
|
|
37
|
+
{ actorFullName: 'owner/missing' },
|
|
38
|
+
{ actorRawId: 'rawMissing' },
|
|
39
|
+
{ actorFullName: 'owner/a' },
|
|
40
|
+
];
|
|
41
|
+
expect(await withActorIds(targets, fakeClient())).toEqual([
|
|
42
|
+
{ actorFullName: 'owner/missing' },
|
|
43
|
+
{ actorRawId: 'rawMissing' },
|
|
44
|
+
{ actorFullName: 'owner/a', actorRawId: 'rawA' },
|
|
45
|
+
]);
|
|
42
46
|
});
|
|
43
47
|
});
|