diff --git a/src/components/__tests__/calendar-default-alert-ids.test.ts b/src/components/__tests__/calendar-default-alert-ids.test.ts index bc56bad6..91097745 100644 --- a/src/components/__tests__/calendar-default-alert-ids.test.ts +++ b/src/components/__tests__/calendar-default-alert-ids.test.ts @@ -8,6 +8,7 @@ import { describe, it, expect, vi } from 'vitest'; vi.mock('../icons', () => ({ Check: () => null, Plus: () => null, X: () => null })); vi.mock('../Button', () => ({ default: () => null })); vi.mock('../../lib/use-layout', () => ({ useSheetInsets: () => ({}) })); +vi.mock('../../lib/sheet-bottom-inset', () => ({ useSheetBottomInset: () => 0 })); vi.mock('../../theme/colors', () => ({ useColors: () => ({}) })); import type { Alert } from '../../api/types'; diff --git a/src/components/__tests__/sidebar-folder-names.test.ts b/src/components/__tests__/sidebar-folder-names.test.ts index 0a0f13bf..9eb85b4c 100644 --- a/src/components/__tests__/sidebar-folder-names.test.ts +++ b/src/components/__tests__/sidebar-folder-names.test.ts @@ -10,7 +10,9 @@ describe('folder list names', () => { it('marks the open folder as selected and says its unread count with its name', () => { expect(src).toMatch(/accessibilityState=\{isAccountHeader \? undefined : \{ selected: isSelected \}\}/); - expect(src).toMatch(/t\('shell\.name_unread', '\{name\}, \{count\} unread', \{ name: label, count: unread \}\)/); + expect(src).toMatch(/const accessibleName = isAccountHeader \? label : unreadRowLabel\(label, unread, t\)/); + const helper = fs.readFileSync(path.resolve(__dirname, '../../lib/unread-row-label.ts'), 'utf8'); + expect(helper).toMatch(/t\('shell\.name_unread', '\{name\}, \{count\} unread', \{ name, count: unread \}\)/); expect(src).toMatch(/accessibilityLabel=\{accessibleName\}/); });