mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
After merging master (which migrated yarn -> pnpm) into the React 19 upgrade branch, several follow-ups were needed to satisfy the merged toolchain: - Convert `import * as classNames from 'classnames'` to default-import style across UI components for esModuleInterop compatibility. - Repoint stragglers still importing `FormApi` from `react-form` to argo-ui (which now provides a React 19-compatible compat module). - Restore explicit `(): null => null` return annotation in resource-details.tsx for noImplicitAny. - Drop `isolatedModules: true` from tsconfig (incompatible with the pinned argo-ui fork's source `.ts` exports). - Exclude *.test.ts(x) from tsconfig.json (matches master) and remove the now-redundant tsconfig.lint.json. - Configure ts-jest with isolatedModules so test files are transpiled rather than fully type-checked, matching master. - Drop duplicate `setupFiles` entry in jest.config.js so @testing-library/jest-dom only loads after Jest globals exist. - Convert revision-metadata-panel.test.tsx from react-test-renderer (removed in this branch) to @testing-library/react. Verification: pnpm install --frozen-lockfile, pnpm lint, pnpm build, and NODE_ENV=test pnpm test all pass (209 tests across 19 suites). Signed-off-by: Jonathan Winters <[email protected]>
21 lines
713 B
JavaScript
21 lines
713 B
JavaScript
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'jsdom',
|
|
reporters: ['default', 'jest-junit'],
|
|
collectCoverage: true,
|
|
testPathIgnorePatterns: ['/node_modules/', '/.yalc/'],
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
transformIgnorePatterns: ['node_modules/(?!(argo-ui|.*\\.pnpm.*argo-ui.*)/)'],
|
|
transform: {
|
|
'^.+\\.tsx?$': ['ts-jest', {isolatedModules: true}]
|
|
},
|
|
globals: {
|
|
'self': {}
|
|
},
|
|
moduleNameMapper: {
|
|
// https://github.com/facebook/jest/issues/3094
|
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
|
|
'.+\\.(css|styl|less|sass|scss)$': '<rootDir>/__mocks__/fileMock.js',
|
|
},
|
|
};
|