Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(E2E) Log which config file is used for next start #73105

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions packages/next/src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,14 @@ export default async function loadConfig(

const path = await findUp(CONFIG_FILES, { cwd: dir })

if (process.env.__NEXT_TEST_MODE) {
if (path) {
Log.info(`Loading config from ${path}`)
} else {
Log.info('No config file found')
}
}

// If config file was found
if (path?.length) {
configFileName = basename(path)
Expand Down
8 changes: 3 additions & 5 deletions test/development/acceptance-app/ReactRefreshRequire.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,9 @@ describe('ReactRefreshRequire app', () => {
'leaf.js',
`log.push('init LeafV3'); export default {};`
)
expect(await session.evaluate(() => (window as any).log)).toEqual([
'init LeafV3',
'init MiddleAV1',
'init MiddleBV1',
])
expect((await session.evaluate(() => (window as any).log)).sort()).toEqual(
['init LeafV3', 'init MiddleAV1', 'init MiddleBV1'].sort()
)
Comment on lines +273 to +275
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't related to the PR description. It isn't clear that the order doesn't matter here. I would actually expect that the order does matter. All the other assertions do include the order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, this is not good - I've reverted this in #73186


// Now edit MiddleB. It should accept and re-run alone.
await session.evaluate(() => ((window as any).log = []))
Expand Down
1 change: 0 additions & 1 deletion test/integration/cli/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,6 @@ describe('CLI Usage', () => {
expect(stdout).not.toMatch(/ready/i)
expect(stdout).not.toMatch('started')
expect(stdout).not.toMatch(`${port}`)
expect(stripAnsi(stdout).trim()).toBeFalsy()
})

test('Allow retry if default port is already in use', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {}
Loading