jan/web/jest.config.js
Faisal Amir 19a60bc973
test: added more test inside containers component (#3765)
* test: wip several component under containers

* remoce checkbox test containers

* test: added more test to containers component
2024-10-16 09:45:28 +07:00

37 lines
888 B
JavaScript

const nextJest = require('next/jest')
/** @type {import('jest').Config} */
const createJestConfig = nextJest({})
// Add any custom config to be passed to Jest
const config = {
testEnvironment: 'jsdom',
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
},
moduleNameMapper: {
// ...
'^@/(.*)$': '<rootDir>/$1',
},
// Add more setup options before each test is run
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
runner: './testRunner.js',
collectCoverageFrom: ['./**/*.{ts,tsx}'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
diagnostics: false,
},
],
},
}
// https://stackoverflow.com/a/72926763/5078746
// module.exports = createJestConfig(config)
module.exports = async () => ({
...(await createJestConfig(config)()),
transformIgnorePatterns: ['/node_modules/(?!(layerr)/)'],
})