Skip to content

Commit

Permalink
✅ E2E for AsyncScheduler were relying on changing data (#630)
Browse files Browse the repository at this point in the history
See:
```
      Received: 1
          at propertyValidator (C:\dev\fast-check\test\e2e\AsyncScheduler.spec.ts:152:21)
          at processTicksAndRejections (internal/process/task_queues.js:93:5)
          at AsyncProperty.run (C:\dev\fast-check\src\check\property\AsyncProperty.generic.ts:31:22)
          at asyncRunIt (C:\dev\fast-check\src\check\runner\Runner.ts:44:17)
    -     at Object.<anonymous> (C:\dev\fast-check\test\e2e\AsyncScheduler.spec.ts:155:17)
    +     at Object.<anonymous> (C:\dev\fast-check\test\e2e\AsyncScheduler.spec.ts:169:22)
```
  • Loading branch information
dubzzz authored Jun 15, 2020
1 parent 0a9ac88 commit 0817607
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/e2e/AsyncScheduler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ describe(`AsyncScheduler (seed: ${seed})`, () => {
expect(outRetry.failed).toBe(true);
expect(outRetry.numRuns).toBe(1);

expect(outRetry.error).toBe(out.error);
const cleanError = (error: string) => {
return error.replace(/AsyncScheduler\.spec\.ts:\d+:\d+/g, 'AsyncScheduler.spec.ts:*:*');
};
expect(cleanError(outRetry.error!)).toBe(cleanError(out.error!));
expect(String(outRetry.counterexample![0])).toBe(String(out.counterexample![0]));
});
});

0 comments on commit 0817607

Please sign in to comment.