Skip to content

Commit 097fb3c

Browse files
authoredOct 30, 2021
Revert incremental config to fix missing types (#30644)
* Revert incremental config to fix missing types * Add failing test
1 parent aa70f46 commit 097fb3c

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed
 

‎packages/next/tsconfig.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"target": "ES2017",
66
"esModuleInterop": true,
77
"moduleResolution": "node",
8-
"jsx": "react",
9-
"incremental": true
8+
"jsx": "react"
109
},
1110
"exclude": ["dist", "./*.d.ts"]
1211
}
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { createNext } from 'e2e-utils'
2+
import { renderViaHTTP } from 'next-test-utils'
3+
import { NextInstance } from 'test/lib/next-modes/base'
4+
5+
describe('TypeScript basic', () => {
6+
let next: NextInstance
7+
8+
beforeAll(async () => {
9+
next = await createNext({
10+
files: {
11+
'pages/index.tsx': `
12+
import { useRouter } from 'next/router'
13+
import Link from 'next/link'
14+
15+
export default function Page() {
16+
const router = useRouter()
17+
return (
18+
<>
19+
<p>hello world</p>
20+
<Link href='/another'>
21+
<a>to /another</a>
22+
</Link>
23+
</>
24+
)
25+
}
26+
`,
27+
},
28+
dependencies: {
29+
typescript: '4.4.3',
30+
'@types/react': '16.9.17',
31+
},
32+
})
33+
})
34+
afterAll(() => next.destroy())
35+
36+
it('have built and started correctly', async () => {
37+
const html = await renderViaHTTP(next.url, '/')
38+
expect(html).toContain('hello world')
39+
})
40+
})

0 commit comments

Comments
 (0)
Please sign in to comment.