b4b757c25d
### What? make sure that we don't error for dynamic requests on server side. It will throw at runtime when using a dynamic request. ### Why? Not all packages are fully bundler compatible, but still work when only using the parts that work. We don't want to block users from using them by having an hard compile error. ### How? Closes PACK-2675
18 lines
499 B
TypeScript
18 lines
499 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('dynamic-requests', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should not error for dynamic requests in pages', async () => {
|
|
const $ = await next.render$('/')
|
|
expect($('p').text()).toBe('Hello World')
|
|
})
|
|
|
|
it('should not error for dynamic requests in routes', async () => {
|
|
const res = await next.fetch('/hello')
|
|
const html = await res.text()
|
|
expect(html).toContain('Hello World')
|
|
})
|
|
})
|