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/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. It fails if the token can't see the Actor. A dry-run plan, empty or invalid input is an
300
- error, as with `build`. So is a missing `TESTER_APIFY_TOKEN`: without it the lib skips every platform test, and the
301
- run would pass having tested nothing. `test` passes the Actors to vitest as `ACTOR_BUILDS`, in place of any
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-test-tools",
3
- "version": "0.10.2-beta.16",
3
+ "version": "0.10.2-beta.17",
4
4
  "type": "module",
5
5
  "description": "TBD",
6
6
  "repository": {
@@ -32,12 +32,16 @@ describe('withActorIds', () => {
32
32
  expect(client.actor).not.toHaveBeenCalled();
33
33
  });
34
34
 
35
- it('fails for an Actor the token cannot see, instead of skipping its tests', async () => {
36
- await expect(withActorIds([{ actorFullName: 'owner/missing' }], fakeClient())).rejects.toThrow(
37
- 'Actor owner/missing not found',
38
- );
39
- await expect(withActorIds([{ actorRawId: 'rawMissing' }], fakeClient())).rejects.toThrow(
40
- 'Actor rawMissing not found',
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
  });