From 327dea7ec6f309f2e41836708649120c7ff1f6db Mon Sep 17 00:00:00 2001 From: Michael Stelly Date: Mon, 16 Jun 2025 07:16:02 -0500 Subject: [PATCH 1/2] fix: Jest configuration syntax error and test file standardization - Fixed testMatch pattern in jest.config.js (removed extra '>' character) - Renamed Select.test.tsx to Select.spec.tsx for consistency - Moved Select test to proper __tests__ directory structure - Updated import path and snapshot for relocated test file - All 4 test suites now pass with 18 tests total --- jest.config.js | 2 +- .../components/common/Select.spec.tsx} | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) rename src/{components/common/Select.test.tsx => __tests__/components/common/Select.spec.tsx} (80%) diff --git a/jest.config.js b/jest.config.js index 2e5802c1..39a04f46 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,6 +5,6 @@ module.exports = { '^.+\\.(js|jsx|ts|tsx)?$': 'ts-jest', }, transformIgnorePatterns: ['/node_modules/'], - testMatch: ['>/__tests__/**/*.spec.(js|jsx|ts|tsx)'], + testMatch: ['/__tests__/**/*.spec.(js|jsx|ts|tsx)'], setupFilesAfterEnv: ['/jest.setup.js'], } diff --git a/src/components/common/Select.test.tsx b/src/__tests__/components/common/Select.spec.tsx similarity index 80% rename from src/components/common/Select.test.tsx rename to src/__tests__/components/common/Select.spec.tsx index b54a6e4e..9d8ceb19 100644 --- a/src/components/common/Select.test.tsx +++ b/src/__tests__/components/common/Select.spec.tsx @@ -1,6 +1,6 @@ import React from 'react' import { render } from '@testing-library/react' -import Select from './Select' +import Select from '../../../components/common/Select' it('renders without crashing', () => { const { container } = render( @@ -16,11 +16,13 @@ it('renders without crashing', () => {
-

+

The title -
+
{ class="ant-select-selection-search" > { readonly="" role="combobox" style="opacity: 0;" + type="search" + unselectable="on" value="" /> one option @@ -57,12 +62,11 @@ it('renders without crashing', () => { >