test: fix should not transform external for newer Node versions (#34006)
This commit is contained in:
parent
c700a8405c
commit
258881bea1
|
|
@ -143,12 +143,13 @@ test('should not transform external', async ({ runInlineTest }) => {
|
|||
});
|
||||
`,
|
||||
'a.spec.ts': `
|
||||
import { test, expect } from '@playwright/test';
|
||||
const { test, expect, Page } = require('@playwright/test');
|
||||
let page: Page;
|
||||
test('succeeds', () => {});
|
||||
`
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.output).toMatch(/(Cannot use import statement outside a module|require\(\) of ES Module .* not supported.)/);
|
||||
expect(result.output).toContain(`SyntaxError: Unexpected token ':'`);
|
||||
});
|
||||
|
||||
for (const type of ['module', undefined]) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue