fix(host): review round 22 — note enumeration includes the create path; cross-method equality pinned; NFD-volume boundary recorded

This commit is contained in:
creatixchu
2026-07-30 02:53:45 +08:00
parent 8016591ebe
commit de24461b91
10 changed files with 22 additions and 13 deletions
@@ -38,5 +38,6 @@ it('resolves a decorated homedir before stamping listing.home', async () => {
const listing = await picked.list()
expect(listing.home).toBe(resolve(scratch))
expect(listing.path).toBe(listing.home)
expect(listing.crumbs.at(-1)!.path).toBe(listing.home)
await fiber.dispose()
})
@@ -207,6 +207,10 @@ describe('BrowseDirectoryPicker', () => {
expect(created).toBe(join(root, 'fresh'))
const listing = await capability.list(root)
expect(listing.entries.map(entry => entry.name)).toContain('fresh')
// The contract's cross-method equality: the returned path is verbatim
// the child's entries[].path (clients anchor the create landing's
// selection and focus on it).
expect(listing.entries.find(entry => entry.name === 'fresh')!.path).toBe(created)
})
it('refuses an existing child with directory-exists', async () => {