mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 22:54:21 -05:00
b30cc5b390
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
27 lines
883 B
TypeScript
27 lines
883 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
import nextJest from 'next/jest'
|
|
|
|
const createJestConfig = nextJest({
|
|
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
|
|
dir: './'
|
|
})
|
|
|
|
// Add any custom config to be passed to Jest
|
|
const customJestConfig = {
|
|
setupFilesAfterEnv: [
|
|
'@testing-library/jest-dom/extend-expect'
|
|
],
|
|
moduleNameMapper: {
|
|
// Handle module aliases (this will be automatically configured for you soon)
|
|
'^@/components/(.*)$': '<rootDir>/src/components/$1',
|
|
},
|
|
roots: ["<rootDir>/src"],
|
|
testPathIgnorePatterns: ["/node_modules/", "/cypress/"]
|
|
}
|
|
|
|
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
|
|
module.exports = createJestConfig(customJestConfig)
|