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:
Brennan Benson
2026-08-25 06:51:07 -07:00
parent 88f27c9be7
commit f7f37a5c4e
@@ -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', () => {