Files
orca/src/renderer/src/components/settings/RepositoryPane.test.ts
T
Jinjing 55e6f4bfcd Improve setup settings organization (#2503)
* fix: address review findings

* fix: address review findings
2026-05-21 16:33:30 -07:00

28 lines
1.0 KiB
TypeScript

import { describe, expect, it } from 'vitest'
import type { Repo } from '../../../../shared/types'
import { getRepositoryPaneSearchEntries } from './RepositoryPane'
import { matchesSettingsSearch } from './settings-search'
const repo: Repo = {
id: 'repo-1',
path: '/tmp/repo',
displayName: 'Example Repo',
badgeColor: '#000000',
addedAt: 1,
kind: 'git'
}
describe('RepositoryPane search entries', () => {
it('keeps renamed hook sections reachable through settings search', () => {
const entries = getRepositoryPaneSearchEntries(repo)
expect(matchesSettingsSearch('setup script', entries)).toBe(true)
expect(matchesSettingsSearch('archive script', entries)).toBe(true)
expect(matchesSettingsSearch('setup command', entries)).toBe(true)
expect(matchesSettingsSearch('archive command', entries)).toBe(true)
expect(matchesSettingsSearch('advanced', entries)).toBe(true)
expect(matchesSettingsSearch('command source', entries)).toBe(true)
expect(matchesSettingsSearch('local settings scripts', entries)).toBe(true)
})
})