Initial Commit

This commit is contained in:
2025-08-16 14:17:46 -04:00
commit 651a21a035
49 changed files with 1347 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import {describe, it, expect, mock} from 'bun:test';
import {createRangeIterator} from '../../src/functions';
describe('When generating a range iterator', () => {
describe('Given start and stop values', () => {
const start = 1;
const stop = 10;
const mockFn = mock(() => undefined);
it('generates an iterator of the correct length', () => {
const rangeIterator = createRangeIterator(1, 10);
for (const idx of rangeIterator) {
mockFn();
}
expect(mockFn).toHaveBeenCalledTimes(9);
});
});
});