macOS: Add support for 12/24-hour time display preferences

This commit is contained in:
Jamie Kyle 2023-07-31 09:23:19 -07:00 committed by GitHub
parent 88858af144
commit 1143c0e9ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 208 additions and 14 deletions

View file

@ -6,6 +6,7 @@ import { stub } from 'sinon';
import * as LocaleMatcher from '@formatjs/intl-localematcher';
import { load, _getAvailableLocales } from '../../../app/locale';
import { FAKE_DEFAULT_LOCALE } from '../../../app/spell_check';
import { HourCyclePreference } from '../../types/I18N';
describe('locale', async () => {
describe('load', () => {
@ -23,7 +24,11 @@ describe('locale', async () => {
preferredSystemLocales: Array<string>,
expectedLocale: string
) {
const actualLocale = await load({ preferredSystemLocales, logger });
const actualLocale = await load({
preferredSystemLocales,
hourCyclePreference: HourCyclePreference.UnknownPreference,
logger,
});
assert.strictEqual(actualLocale.name, expectedLocale);
}