🛠️ Add testing with vitest.

This commit is contained in:
pheralb 2023-03-20 10:58:30 +00:00
parent c81419a49a
commit a1ca62410b

View File

@ -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();
});
});