Files
orca/src/shared/quick-open-listing-limits.test.ts
T
Jinwoo Hong 74856c83b3 fix(dev): keep Node-only Quick Open path accumulator out of the renderer (#27372)
The renderer imports quick-open-listing-limits for the result cap, but the
same module also held a Buffer-backed accumulator that imports the CommonJS
@orca/process-host dist. Vite dev serves that dist as raw ESM, so the named
import failed and the workspace workbench and right sidebar crashed. Move the
accumulator to its own main-only module.
2026-10-11 00:22:18 -04:00

17 lines
602 B
TypeScript

import { describe, expect, it } from 'vitest'
import {
resolveQuickOpenResultLimit,
QUICK_OPEN_LISTING_MAX_RESULTS
} from './quick-open-listing-limits'
describe('Quick Open listing limits', () => {
it('uses one hard result cap while preserving smaller requested limits', () => {
expect(resolveQuickOpenResultLimit()).toBe(QUICK_OPEN_LISTING_MAX_RESULTS)
expect(resolveQuickOpenResultLimit(17)).toBe(17)
expect(resolveQuickOpenResultLimit(QUICK_OPEN_LISTING_MAX_RESULTS + 1)).toBe(
QUICK_OPEN_LISTING_MAX_RESULTS
)
expect(resolveQuickOpenResultLimit(0)).toBe(0)
})
})