Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
VIKTORVAV99 committed Jul 15, 2024
1 parent 5c9a893 commit 8763e9f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/utils.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { describe, it, expect } from 'vitest';
import { isString } from '../src/utils.js';

describe('isString', () => {
it('should return true for strings', () => {
expect(isString('string')).toBe(true);
});

it.each([[undefined], [null], [1], [{}], [[]], [() => {}]])(
'should return false for non-strings, testing %o',
(value) => {
expect(isString(value)).toBe(false);
},
);
});

0 comments on commit 8763e9f

Please sign in to comment.