Skip to content

Commit

Permalink
add regression test for #38854
Browse files Browse the repository at this point in the history
  • Loading branch information
qrohlf committed Feb 12, 2023
1 parent 95313a4 commit 36d2b72
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import helloWorldString from 'pkg/sub-export'

export default function Page() {
return <p>{helloWorldString}</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "pkg",
"version": "1.0.0",
"type": "module",
"exports": {
"./sub-export": "./src/some-file.js"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare const _default: 'Hello, world'
export default _default
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default 'Hello, world'
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createNextDescribe, FileRef } from 'e2e-utils'
import { join } from 'path'

// regression test suite for https://github.com/vercel/next.js/issues/38854
createNextDescribe(
'Does not override tsconfig during build',
{
packageJson: { type: 'module' },
files: {
'tsconfig.json': new FileRef(join(__dirname, 'tsconfig.json')),
pages: new FileRef(join(__dirname, 'pages')),
pkg: new FileRef(join(__dirname, 'pkg')),
},
// skipStart: true,
dependencies: {
typescript: 'latest',
'@types/react': 'latest',
'@types/node': 'latest',
pkg: './pkg',
},
},
({ next }) => {
it('boots and renders without throwing an error', async () => {
// dummy test for now - not sure why this is failing on `next build`,
// as I can cd into the isolated next install and run `next build`
// without issue...
await next.render$('/')
})
}
)

0 comments on commit 36d2b72

Please sign in to comment.