Skip to content

Commit

Permalink
Apply suggestion from ForsakenHarmony
Browse files Browse the repository at this point in the history
  • Loading branch information
styfle committed Jun 8, 2023
1 parent 9e9e407 commit 81c0f18
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ createNextDescribe(
},
({ next, isNextDeploy, isNextDev }) => {
if (isNextDeploy || isNextDev) {
it('should skip', async () => {
expect(1).toBe(1)
})
} else {
it('should not print warning when new typescript version is used with next build', async () => {
await next.start().catch(() => {})
expect(next.cliOutput).not.toContain(
'Minimum recommended TypeScript version is'
)
})
it('should skip', () => {})
return
}

it('should not print warning when new typescript version is used with next build', async () => {
await next.start().catch(() => {})
expect(next.cliOutput).not.toContain(
'Minimum recommended TypeScript version is'
)
})
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ createNextDescribe(
},
({ next, isNextDeploy, isNextDev }) => {
if (isNextDeploy || isNextDev) {
it('should skip', async () => {
expect(1).toBe(1)
})
} else {
it('should print warning when old typescript version is used with next build', async () => {
await next.start().catch(() => {})
expect(next.cliOutput).toContain(
'warn Minimum recommended TypeScript version is v4.5.2, older versions can potentially be incompatible with Next.js. Detected: 4.0.6'
)
})
it('should skip', () => {})
return
}

it('should print warning when old typescript version is used with next build', async () => {
await next.start().catch(() => {})
expect(next.cliOutput).toContain(
'warn Minimum recommended TypeScript version is v4.5.2, older versions can potentially be incompatible with Next.js. Detected: 4.0.6'
)
})
}
)

0 comments on commit 81c0f18

Please sign in to comment.