From 973209c0976b022040b71d9909ad88be5052fab1 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Wed, 30 Oct 2024 10:56:30 +0000 Subject: [PATCH] fix: add watch=false to husky --- .husky/pre-push | 2 +- drama-queen/src/core/tools/axiosError.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.husky/pre-push b/.husky/pre-push index d4be1da7..6862abd8 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,3 @@ yarn --cwd drama-queen run format:check yarn --cwd drama-queen run lint -yarn --cwd drama-queen run test \ No newline at end of file +yarn --cwd drama-queen run test --watch=false \ No newline at end of file diff --git a/drama-queen/src/core/tools/axiosError.test.ts b/drama-queen/src/core/tools/axiosError.test.ts index 477b7344..e363b8a4 100644 --- a/drama-queen/src/core/tools/axiosError.test.ts +++ b/drama-queen/src/core/tools/axiosError.test.ts @@ -3,7 +3,7 @@ import { handleAxiosError } from './axiosError' import { AxiosError } from 'axios' vi.mock('i18n', () => ({ - getTranslation: () => ({ t: (keyMessage: string) => keyMessage }), // Remplacez par la logique de traduction souhaitée + getTranslation: () => ({ t: (keyMessage: string) => keyMessage }), })) describe('handleAxiosError', () => { @@ -34,7 +34,7 @@ describe('handleAxiosError', () => { } as AxiosError const result = handleAxiosError(error) - expect(result.message).toBe('400') // Assurez-vous que la traduction pour '400' est correcte + expect(result.message).toBe('400') }) it('should return the correct message for status 401', () => { @@ -48,7 +48,7 @@ describe('handleAxiosError', () => { } as AxiosError const result = handleAxiosError(error) - expect(result.message).toBe('401') // Assurez-vous que la traduction pour '401' est correcte + expect(result.message).toBe('401') }) it('should return the correct message for unknown status', () => { @@ -62,6 +62,6 @@ describe('handleAxiosError', () => { } as AxiosError const result = handleAxiosError(error) - expect(result.message).toBe('longUnknownError') // Assurez-vous que la traduction pour 'longUnknownError' est correcte + expect(result.message).toBe('longUnknownError') }) })