Skip to content

Commit 34aed21

Browse files
authored
Merge pull request #41 from workfloworchestrator/1008-jest-config-fix-for-nextjs
2 parents f6f90f6 + 05c40cb commit 34aed21

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

jest.config.cjs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
const base = require('@orchestrator-ui/jest-config/jest-base.config.js');
2+
const nextJest = require('next/jest');
23

3-
module.exports = {
4+
const createJestConfig = nextJest({
5+
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
6+
dir: './',
7+
});
8+
9+
// The entry for "uuid" in the moduleNameMapper can be removed when EUI updates the dependency version to 9.0.0 or higher.
10+
// https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
11+
const customJestConfig = {
412
...base,
513
displayName: 'Wfo-UI Tests',
14+
moduleNameMapper: { "^uuid$": "uuid" },
615
};
16+
17+
module.exports = createJestConfig(customJestConfig);

0 commit comments

Comments
 (0)