mirror of
https://github.com/stablyai/orca.git
synced 2026-11-03 02:27:43 +00:00
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.
17 lines
602 B
TypeScript
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)
|
|
})
|
|
})
|