Files
Tim NeutkensandGitHub c34851a12c Turbopack: Allow fully dynamic import() in node_modules (#79153)
## What?

Allows e.g. ```import(`${url}`)``` when in node_modules. This makes
monaco-editor work automatically when it's correctly imported in e.g. a
`useEffect`.

- [x] Apply change 
- [x] Verify against local reproduction
- [x] Add test case

Fixes #72613
Fixes PACK-4602
2025-05-15 13:45:25 +02:00

20 lines
535 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
describe('monaco-editor', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
'monaco-editor': '^0.52.2',
},
})
// Recommended for tests that need a full browser
it('should load monaco-editor', async () => {
const browser = await next.browser('/')
expect(await browser.elementByCss('h1').text()).toBe('Editor Page')
expect(
await browser.waitForElementByCss('.monaco-editor').getAttribute('role')
).toBe('code')
})
})