Skip to content

Commit

Permalink
Adjust the order of arguments in macro/repeat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reczkok authored Jul 9, 2024
1 parent bb55010 commit b0e7d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/wigsill/tests/macro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { repeat, wgsl } from 'wigsill';

describe('repeat', () => {
it('repeats a string', () => {
const result = repeat('a', 3);
const result = repeat(3, 'a');
expect(result).toEqual(wgsl`${['a', 'a', 'a']}`);
});

it('repeats a computed string', () => {
const result = repeat((idx) => `a${idx}`, 3);
const result = repeat(3, (idx) => `a${idx}`);
expect(result).toEqual(wgsl`${['a0', 'a1', 'a2']}`);
});
});

0 comments on commit b0e7d22

Please sign in to comment.