diff --git a/scripts/patched-jest-resolver.js b/scripts/patched-jest-resolver.js index 9907ca01c98a4..0116facee7923 100644 --- a/scripts/patched-jest-resolver.js +++ b/scripts/patched-jest-resolver.js @@ -63,7 +63,10 @@ module.exports = function (path, options) { } // Try to use the defaultResolver try { - if (path.startsWith('@nx/')) throw new Error('custom resolution'); + // powerpack packages are installed via npm and resolved like any other packages + if (path.startsWith('@nx/') && !path.startsWith('@nx/powerpack-')) { + throw new Error('custom resolution'); + } if (path.startsWith('nx/')) throw new Error('custom resolution'); if (path.indexOf('@nx/workspace') > -1) { diff --git a/tools/workspace-plugin/jest.config.ts b/tools/workspace-plugin/jest.config.ts index b2304c749967d..946685cfeee00 100644 --- a/tools/workspace-plugin/jest.config.ts +++ b/tools/workspace-plugin/jest.config.ts @@ -1,8 +1,7 @@ /* eslint-disable */ export default { displayName: 'workspace-plugin', - // TODO: For some reason our patched jest resolve cannot work with @nx/powerpack-conformance - // preset: '../../jest.preset.js', + preset: '../../jest.preset.js', transform: { '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], },