mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 16:03:49 +00:00
test(native-chat): cover the scope ordering the budgeted list depends on
Review round 2 (both lanes) found two mutations the suite missed: deleting the final re-sort in limitSkillsAcrossScopes, and swapping SCOPE_PRIORITY. Either would ship a scope-interleaved list unnoticed. Assert the budgeted result is still scope-ordered; both mutants now fail this test.
This commit is contained in:
@@ -321,9 +321,9 @@ describe('native skill and command picker', () => {
|
||||
]
|
||||
const names = buildNativeChatPickerItems([], skills, '', '/').map((item) => item.name)
|
||||
expect(names).toHaveLength(500)
|
||||
expect(names).toContain('home-skill-0')
|
||||
expect(names).toContain('home-skill-1')
|
||||
expect(names).toContain('home-skill-2')
|
||||
// Budgeted rows still land in scope order, so the home rows sort last.
|
||||
expect(names.slice(-3)).toEqual(['home-skill-0', 'home-skill-1', 'home-skill-2'])
|
||||
expect(names.slice(0, -3).every((name) => name.startsWith('repo-skill-'))).toBe(true)
|
||||
})
|
||||
|
||||
it('keeps a queried catalog in rank order rather than spreading it across scopes', () => {
|
||||
|
||||
Reference in New Issue
Block a user