fix: prerelease version

This commit is contained in:
imccyu
2026-08-11 03:20:16 +08:00
parent 41360d98bc
commit a5c23dd36a
4 changed files with 61 additions and 12 deletions
@@ -461,7 +461,11 @@ describe('CreateWizard and scaffolder', () => {
})
it('reads the release batch from the initializer package', async () => {
await expect(readCreateSdkVersion()).resolves.toBe('0.0.1')
// The version tracks the release, including a prerelease such as 0.0.1-rc.1,
// so the expectation comes from the manifest rather than a literal.
const manifest = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8')) as { version: string }
await expect(readCreateSdkVersion()).resolves.toBe(manifest.version)
})
})