Files
motovaultpro/frontend/jest.config.ts
Eric Gullickson f6684e72c0
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m22s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 51s
Deploy to Staging / Verify Staging (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
test: add dashboard redesign tests (refs #201)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 11:03:52 -06:00

41 lines
1.0 KiB
TypeScript

/**
* Jest configuration for MotoVaultPro frontend (React + TS, ESM)
*/
import type { Config } from 'jest';
const tsJestTransformCfg = {
tsconfig: 'tsconfig.json',
useESM: true,
};
const config: Config = {
testEnvironment: 'jsdom',
roots: ['<rootDir>/src'],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', tsJestTransformCfg],
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'(.*/core/api/client)$': '<rootDir>/src/core/api/__mocks__/client.ts',
'\\.(css|less|scss|sass)$': '<rootDir>/test/__mocks__/styleMock.js',
'\\.(svg|png|jpg|jpeg|gif)$': '<rootDir>/test/__mocks__/fileMock.js',
},
setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
testMatch: ['**/*.test.ts', '**/*.test.tsx'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
reporters: [
'default',
[
'tdd-guard-jest',
{
projectRoot: '/home/egullickson/motovaultpro',
},
],
],
};
export default config;