1
0
Fork 0

use expect for throw test, limit runs

This commit is contained in:
ssube 2021-07-22 13:18:45 -05:00
parent 9b815a5391
commit 8e16d8fbfd
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 6 deletions

View File

@ -16,11 +16,7 @@ describe('example properties', () => {
});
it('should not throw', (n: number) => {
if (n.toString()[3] === '9') {
throw new Error('not a real number!');
}
return true;
expect(n).to.equal(9);
});
it('should resolve async checks', async (n: number) => {
@ -44,7 +40,7 @@ describe('example properties', () => {
}, {
// fast-check parameters are supported, like examples
examples: ['a', 'b'],
numRuns: 1_000_000_000,
numRuns: 1_000,
});
over('even numbers', integer().filter(n => n % 2 === 0), (it) => {