mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
24 lines
912 B
TypeScript
24 lines
912 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
DEFAULT_SOURCE_CONTROL_GROUP_ORDER,
|
|
normalizeSourceControlGroupOrder
|
|
} from './source-control-group-order'
|
|
|
|
describe('normalizeSourceControlGroupOrder', () => {
|
|
it('keeps supported source control group orders', () => {
|
|
expect(normalizeSourceControlGroupOrder('changes-first')).toBe('changes-first')
|
|
expect(normalizeSourceControlGroupOrder('staged-first')).toBe('staged-first')
|
|
})
|
|
|
|
it('maps the legacy untracked-first preference to combined Changes first', () => {
|
|
expect(normalizeSourceControlGroupOrder('untracked-first')).toBe('changes-first')
|
|
})
|
|
|
|
it('falls back to the default for malformed values', () => {
|
|
expect(normalizeSourceControlGroupOrder('tracked-first')).toBe(
|
|
DEFAULT_SOURCE_CONTROL_GROUP_ORDER
|
|
)
|
|
expect(normalizeSourceControlGroupOrder(undefined)).toBe(DEFAULT_SOURCE_CONTROL_GROUP_ORDER)
|
|
})
|
|
})
|