1 import { resolveAfter } from './resolve_after';
3 describe('Resolve After', () => {
4 test('it should throw if given 0', () => {
10 test('it should throw if given a negative number', () => {
16 test('it should resolve after the specified number of times', () => {
18 const { counter, promise: resolveAfterThree } = resolveAfter(3);
21 resolveAfterThree.then(() => (resolved = true));
23 expect(resolved).toBe(false);
25 expect(resolved).toBe(false);
27 expect(resolved).toBe(true);