Files
modeling-app/jest.config.ts
Adam Chalmers 956e4c46c1 Jest GitHub Action annotation (#194)
Jest now supports a reporter which emits GitHub Actions annotations. So if a test fails, it should annotate your PR when you view it on GitHub. See their example at https://jestjs.io/docs/configuration#github-actions-reporter

Also, use typescript for the config file.
2023-07-26 14:44:54 -05:00

19 lines
509 B
TypeScript

import type { Config } from 'jest'
const config: Config = {
testEnvironment: 'jsdom',
preset: 'ts-jest/presets/js-with-ts',
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
},
transformIgnorePatterns: ['//node_modules/(?!(allotment|@tauri-apps/api)/)'],
moduleNameMapper: {
'^allotment$': 'allotment/dist/legacy',
},
setupFilesAfterEnv: ['./src/setupTests.ts'],
reporters: [['github-actions', { silent: false }], 'summary'],
}
export default config