Skip to content

Commit 77e5148

Browse files
test(start-plugin-core): compare entry paths in the form Start resolves them
Entry planning resolves a configured server entry with forward slashes on every platform, as exsolve returns it. The tests expected realpathSync's native form, which uses backslashes on Windows, so they failed on the Windows compiler job. Normalize the expected path with pathe. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 66b7143 commit 77e5148

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎packages/start-plugin-core/tests/entry-planning.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from 'node:fs'
88
import { tmpdir } from 'node:os'
99
import { join } from 'node:path'
10+
import { normalize } from 'pathe'
1011
import { afterEach, describe, expect, test } from 'vitest'
1112
import { resolveStartEntryPlan } from '../src/planning'
1213
import { parseStartConfig as parseRsbuildStartConfig } from '../src/rsbuild/schema'
@@ -78,7 +79,7 @@ describe('server entry planning', () => {
7879
defaultEntryPaths,
7980
})
8081

81-
expect(plan.entryPaths.server).toBe(realpathSync(serverEntry))
82+
expect(plan.entryPaths.server).toBe(normalize(realpathSync(serverEntry)))
8283
})
8384

8485
test.each([
@@ -109,7 +110,7 @@ describe('server entry planning', () => {
109110
defaultEntryPaths,
110111
})
111112

112-
expect(plan.entryPaths.server).toBe(realpathSync(serverEntry))
113+
expect(plan.entryPaths.server).toBe(normalize(realpathSync(serverEntry)))
113114
},
114115
)
115116
})

0 commit comments

Comments
 (0)