Skip to content

Commit 8763e9f

Browse files
committed
add test
1 parent 5c9a893 commit 8763e9f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/utils.spec.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { describe, it, expect } from 'vitest';
2+
import { isString } from '../src/utils.js';
3+
4+
describe('isString', () => {
5+
it('should return true for strings', () => {
6+
expect(isString('string')).toBe(true);
7+
});
8+
9+
it.each([[undefined], [null], [1], [{}], [[]], [() => {}]])(
10+
'should return false for non-strings, testing %o',
11+
(value) => {
12+
expect(isString(value)).toBe(false);
13+
},
14+
);
15+
});

0 commit comments

Comments
 (0)