From 7a0252c5c6f51f714d2264a32733a25a8d0b9b5c Mon Sep 17 00:00:00 2001 From: Matti Eiden Date: Tue, 16 Apr 2024 22:17:10 +0300 Subject: [PATCH] test: refactor test file structure to be compatible with coverage Tests should be in __tests__ folder (not __test__ or standalone), otherwise they get incorrectly included in coverage calculations. --- src/{ => __tests__}/App.test.tsx | 2 +- .../oidcCallback/{__test__ => __tests__}/OidcCallback.test.tsx | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{ => __tests__}/App.test.tsx (89%) rename src/auth/components/oidcCallback/{__test__ => __tests__}/OidcCallback.test.tsx (100%) diff --git a/src/App.test.tsx b/src/__tests__/App.test.tsx similarity index 89% rename from src/App.test.tsx rename to src/__tests__/App.test.tsx index dd038eea8..c166819a9 100644 --- a/src/App.test.tsx +++ b/src/__tests__/App.test.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import { MemoryRouter } from 'react-router'; -import App from './App'; +import App from '../App'; it('renders without crashing', () => { shallow( diff --git a/src/auth/components/oidcCallback/__test__/OidcCallback.test.tsx b/src/auth/components/oidcCallback/__tests__/OidcCallback.test.tsx similarity index 100% rename from src/auth/components/oidcCallback/__test__/OidcCallback.test.tsx rename to src/auth/components/oidcCallback/__tests__/OidcCallback.test.tsx