From 716f20039f2f11f8034a8b095a34a1bacf4ef0b4 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 05:10:36 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=AF=20Simplify=20test=20code=20formatt?= =?UTF-8?q?ing=20and=20improve=20readability=20in=20useChallongeClient=20u?= =?UTF-8?q?nit=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unit/composables/useChallongeClient.test.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/websites/pokedex.online/tests/unit/composables/useChallongeClient.test.js b/code/websites/pokedex.online/tests/unit/composables/useChallongeClient.test.js index e32a8a1..33b15a7 100644 --- a/code/websites/pokedex.online/tests/unit/composables/useChallongeClient.test.js +++ b/code/websites/pokedex.online/tests/unit/composables/useChallongeClient.test.js @@ -28,7 +28,9 @@ vi.mock('../../../src/composables/useChallongeClientCredentials.js', () => ({ })); vi.mock('../../../src/services/challonge.service.js', async () => { - const actual = await vi.importActual('../../../src/services/challonge.service.js'); + const actual = await vi.importActual( + '../../../src/services/challonge.service.js' + ); return { ...actual, createChallongeV1Client: vi.fn(() => ({ version: 'v1', mock: true })), @@ -40,11 +42,7 @@ import { useChallongeClient } from '../../../src/composables/useChallongeClient. describe('useChallongeClient', () => { it('creates composable with default values', () => { - const { - apiVersion, - tournamentScope, - debugMode - } = useChallongeClient(); + const { apiVersion, tournamentScope, debugMode } = useChallongeClient(); expect(apiVersion.value).toBe('v2.1'); expect(tournamentScope.value).toBe(ScopeType.USER); @@ -53,7 +51,7 @@ describe('useChallongeClient', () => { it('creates client successfully', () => { const { client } = useChallongeClient(); - + expect(client.value).toBeDefined(); expect(client.value).toHaveProperty('version'); });