From 7e4dbd9e2db4ec78320cc696677c8dc21e17fbc3 Mon Sep 17 00:00:00 2001 From: Siklos Date: Sat, 6 Aug 2022 15:27:57 +0200 Subject: [PATCH] Update some tests --- src/Components/Sidebar/Sidebar.test.tsx | 7 +++++-- src/test/api.test.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Components/Sidebar/Sidebar.test.tsx b/src/Components/Sidebar/Sidebar.test.tsx index 3613fc8..be836a9 100644 --- a/src/Components/Sidebar/Sidebar.test.tsx +++ b/src/Components/Sidebar/Sidebar.test.tsx @@ -37,11 +37,14 @@ describe.concurrent('Sidebar open', () => { }); it('With stuff', async() => { - const handleButtonClick = vi.fn(); + const Type = 'stuff'; + const handleButtonClick = vi.fn((type: string) => { + expect(type).toBe(Type); + }); render( { - test('Load environment', () => { +describe.concurrent('API test', () => { + it('Load environment', () => { const url = import.meta.env.VITE_API_URL; expect(url).toBe('http://localhost:5000'); }); - test('Fetch configuration', async() => { + it('Fetch configuration', async() => { const configuration = await fetchConfiguration(); expect(configuration.MainContainer).toBeDefined(); expect(configuration.MainContainer.Height).toBeGreaterThan(0);