inital commit

This commit is contained in:
2026-07-21 01:06:08 -05:00
commit fafc502aeb
10 changed files with 3336 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import { describe, expect, it } from 'vitest';
import { createKeyRotator, parseKeys } from '../src/key-store.js';
describe('key store', () => {
it('parses keys, blank lines, and comments', () => {
expect(parseKeys(' first \n\nsecond # note\n# ignored\n')).toEqual(['first', 'second']);
});
it('rotates keys round-robin', () => {
const rotator = createKeyRotator(['a', 'b']);
expect([rotator.next(), rotator.next(), rotator.next()]).toEqual(['a', 'b', 'a']);
});
});