mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
14 lines
493 B
TypeScript
14 lines
493 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import { normalizeExplorerDisplayRootByWorktree } from './file-explorer-display-root'
|
|
|
|
describe('explorer root persistence', () => {
|
|
it('rejects malformed records and unsafe keys', () => {
|
|
expect(normalizeExplorerDisplayRootByWorktree(['src'])).toEqual({})
|
|
expect(
|
|
normalizeExplorerDisplayRootByWorktree(
|
|
JSON.parse('{"__proto__":"src","constructor":"src","ok":"/","bad":false}')
|
|
)
|
|
).toEqual({ ok: '/' })
|
|
})
|
|
})
|