diff --git a/packages/playwright/package.json b/packages/playwright/package.json index d6a2aa23b2..b64a912ffb 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -28,7 +28,6 @@ "./lib/runner/testServer": "./lib/runner/testServer.js", "./lib/transform/esmLoader": "./lib/transform/esmLoader.js", "./lib/transform/transform": "./lib/transform/transform.js", - "./lib/internalsForTest": "./lib/internalsForTest.js", "./lib/plugins": "./lib/plugins/index.js", "./jsx-runtime": { "import": "./jsx-runtime.mjs", diff --git a/tests/playwright-test/watch.spec.ts b/tests/playwright-test/watch.spec.ts index 946377a357..181fdd4177 100644 --- a/tests/playwright-test/watch.spec.ts +++ b/tests/playwright-test/watch.spec.ts @@ -40,7 +40,7 @@ test('should print dependencies in CJS mode', async ({ runInlineTest }) => { test('passes', () => {}); `, 'globalTeardown.ts': ` - import { fileDependencies } from 'playwright/lib/internalsForTest'; + const { fileDependencies } = require(path.join(path.dirname(require.resolve('playwright')), 'lib/internalsForTest.js')); export default () => { console.log('###' + JSON.stringify(fileDependencies()) + '###'); };