Skip to content

Commit

Permalink
🔬 test: Increase coverage to 100%.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Apr 27, 2021
1 parent d1f1881 commit 6c97b83
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/src/ncycle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import test from 'ava';

import {ncycle} from '../../src/index.js';

test('empty input', (t) => {
const it = ncycle([], 10000);
t.true(it.next().done);
});

test('string input', (t) => {
const actual = Array.from(ncycle('AB', 3));
const expected = ['A', 'B', 'A', 'B', 'A', 'B'];
t.deepEqual(actual, expected);
});

0 comments on commit 6c97b83

Please sign in to comment.