2021-07-21 04:50:21 +00:00
|
|
|
import { integer, uuid } from 'fast-check';
|
2021-07-21 04:20:39 +00:00
|
|
|
|
|
|
|
import { over } from '../src/index';
|
|
|
|
|
|
|
|
describe('some foo', () => {
|
2021-07-21 04:39:29 +00:00
|
|
|
over('the bars', integer(), (it) => {
|
2021-07-21 04:54:15 +00:00
|
|
|
const large = Math.floor(Math.random() * 1_000_000);
|
2021-07-21 04:39:29 +00:00
|
|
|
it('should be a small number', (bar: number) => {
|
2021-07-21 04:54:15 +00:00
|
|
|
return bar < large;
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should be even', (bar: number) => {
|
|
|
|
return bar % 2 === 0;
|
2021-07-21 04:20:39 +00:00
|
|
|
});
|
|
|
|
});
|
2021-07-21 04:50:21 +00:00
|
|
|
|
|
|
|
over('some IDs', uuid(), (it) => {
|
|
|
|
it('should be a good one', (id: string) => {
|
|
|
|
return id[9] !== 'a';
|
|
|
|
});
|
|
|
|
});
|
2021-07-21 04:20:39 +00:00
|
|
|
});
|