Skip to content

Commit 236177b

Browse files
authored
chore(repo): fixup some issues with jest config (#33549)
## Current Behavior There's some issues with the jest configs in the repo, CJS files having `import` in them, etc. ## Expected Behavior CJS files don't have `import` ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 0e500dc commit 236177b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jest.config.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Config } from 'jest';
2-
import { getJestProjectsAsync } from '@nx/jest';
2+
const { getJestProjectsAsync } = require('@nx/jest');
33

44
module.exports = async (): Promise<Config> => ({
55
projects: await getJestProjectsAsync(),

nx-dev/nx-dev/jest.config.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
// Ignore @nx/jest dependency since it is the installed version not the one in the workspace
33
// nx-ignore-next-line
4-
import nxPreset from '@nx/jest/preset';
4+
const { default: nxPreset } = require('@nx/jest/preset');
55

66
module.exports = {
77
...nxPreset,

packages/vitest/jest.config.ts renamed to packages/vitest/jest.config.cts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable */
2-
export default {
2+
module.exports = {
33
displayName: 'vitest',
44
preset: '../../jest.preset.js',
55
globals: {},

0 commit comments

Comments
 (0)