From a1ca62410b29551b72dbbe5b4c1571dd604706bb Mon Sep 17 00:00:00 2001 From: pheralb Date: Mon, 20 Mar 2023 10:58:30 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Add=20testing=20with=20?= =?UTF-8?q?vitest.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/index.test.ts b/src/index.test.ts index 964d287..bf8c590 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -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(); }); });