import { createRandomSamplePipe } from '../../src/pipes/sample'; describe('plugin-pipes-sample', () => { it('randam is isNaN', () => { const sampleFn = createRandomSamplePipe(NaN); const msg = 'script error'; sampleFn(msg, (res) => { expect(res).toBe(msg); }); }); it('randam is 0', () => { const sampleFn = createRandomSamplePipe(0); const msg = 'script error'; sampleFn(msg, (res) => { expect(res).toBe(undefined); }); }); });