$echo '{
< "testSpec": "({ it, xit, moment, _, run, expect, expectAsync, input, describe }) => {\\n (input.resource ? [\\n '\''beta'\'',\\n ] : [\\n '\''latest'\'',\\n ]).forEach((build) => {\\n describe(`${build} version`, () => {\\n it('\''test something-task'\'', async () => {\\n const runResult = await run({\\n taskId: '\'''\'',\\n });\\n\\n await expectAsync(runResult).toHaveStatus('\''SUCCEEDED'\'');\\n await expectAsync(runResult).withLog((log) => {\\n expect(log)\\n .withContext(runResult.format('\''ReferenceError'\''))\\n .not.toContain('\''ReferenceError'\'');\\n expect(log)\\n .withContext(runResult.format('\''TypeError'\''))\\n .not.toContain('\''TypeError'\'');\\n });\\n\\n await expectAsync(runResult).withStatistics((stats) => {\\n expect(stats.requestsRetries)\\n .withContext(runResult.format('\''Request retries'\''))\\n .toBeLessThan(3);\\n\\n expect(stats.crawlerRuntimeMillis)\\n .withContext(runResult.format('\''Run time'\''))\\n .toBeWithinRange(0.1 * 60000, 10 * 60000);\\n });\\n\\n await expectAsync(runResult).withDataset(({ dataset, info }) => {\\n expect(info.cleanItemCount)\\n .withContext(runResult.format('\''Dataset cleanItemCount'\''))\\n .toBeGreaterThan(0);\\n\\n expect(dataset.items)\\n .withContext(runResult.format('\''Dataset items array'\''))\\n .toBeNonEmptyArray();\\n });\\n });\\n });\\n });\\n}",
< "slackChannel": "#public-actors-tests-notifications",
< "slackPrefix": "@lead-dev @actor-owner"
<}' |
<apify call pocesar/actor-testing --silent --output-dataset