mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## 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
20 lines
535 B
TypeScript
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')
|
|
})
|
|
})
|