diff --git a/packages/devkit/src/utils/convert-nx-executor.spec.ts b/packages/devkit/src/utils/convert-nx-executor.spec.ts index f4240aa0dbd8b..2f74b54b9f605 100644 --- a/packages/devkit/src/utils/convert-nx-executor.spec.ts +++ b/packages/devkit/src/utils/convert-nx-executor.spec.ts @@ -1,3 +1,9 @@ +// When plugins from root nx.json load through ts-jest, they can cause transpile errors such as `@nx/playwright/plugin.d.ts` containing an unexpected "export" keyword. +// Mock `loadNxPlugins` function to prevent them from loading. +jest.mock('nx/src/utils/nx-plugin', () => ({ + loadNxPlugins: () => Promise.resolve([]), +})); + import { convertNxExecutor } from './convert-nx-executor'; describe('Convert Nx Executor', () => {