Use yarn pnp as module linker (#2252)

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-07-30 23:32:19 +02:00 committed by GitHub
parent 20a48b38d7
commit 6ba957585a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 271 additions and 7285 deletions

View file

@ -12,18 +12,16 @@ const createJestConfig = nextJest({
// Add any custom config to be passed to Jest
const customJestConfig = {
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect'
],
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
moduleNameMapper: {
// Handle module aliases (this will be automatically configured for you soon)
'^@/components/(.*)$': '<rootDir>/src/components/$1',
// fix uuid / jest problem https://github.com/uuidjs/uuid/pull/616
'^uuid$': require.resolve('uuid'),
'^uuid$': require.resolve('uuid')
},
roots: ["<rootDir>/src"],
roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ["/node_modules/", "/cypress/"]
testPathIgnorePatterns: ['/node_modules/', '/cypress/']
}
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async