UNPKG

@stryker-mutator/core

Version:

The extendable JavaScript mutation testing framework

18 lines 648 B
import { expect } from 'chai'; import { IdGenerator } from '../../../src/child-proxy/id-generator.js'; describe(IdGenerator.name, () => { let idGenerator; beforeEach(() => { idGenerator = new IdGenerator(); }); it('should return 0 on first call to `next`', async () => { const workerId = idGenerator.next(); expect(workerId).eq(0); }); it('should increment `workerId` on calling `next`', async () => { const workerId = idGenerator.next(); const nextWorkerId = idGenerator.next(); expect(nextWorkerId - workerId).eq(1); }); }); //# sourceMappingURL=id-generator.spec.js.map