mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
🛠️ Add testing with vitest.
This commit is contained in:
parent
c81419a49a
commit
a1ca62410b
@ -1,7 +1,14 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { svgs } from './data/svgs';
|
||||
|
||||
describe('sum test', () => {
|
||||
it('adds 1 + 2 to equal 3', () => {
|
||||
expect(1 + 2).toBe(3);
|
||||
describe('Get svgs by category', () => {
|
||||
it('should have a category named "Social"', () => {
|
||||
expect(svgs.find((svg) => svg.category === 'Social')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Get a specific svg', () => {
|
||||
it('should have a svg named "Discord"', () => {
|
||||
expect(svgs.find((svg) => svg.title === 'Discord')).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user