Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/lib/next-modes/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,14 @@ export class NextInstance {
}
}

const nextConfigFile = Object.keys(this.files).find((file) =>
let nextConfigFile = Object.keys(this.files).find((file) =>
file.startsWith('next.config.')
)

if (await fs.pathExists(path.join(this.testDir, 'next.config.js'))) {
nextConfigFile = 'next.config.js'
}

if (nextConfigFile && this.nextConfig) {
throw new Error(
`nextConfig provided on "createNext()" and as a file "${nextConfigFile}", use one or the other to continue`
Expand Down