@fluentui-react-native/apple-theme 0.17.8 → 0.17.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,14 @@
1
- import { createAppleTheme } from '../createAppleTheme';
2
1
  import { createMacOSColorAliasTokens, createMacOSShadowAliasTokens } from '../createMacOSAliasTokens';
3
2
  import { getIsHighContrast, setIsHighContrast } from '../appleHighContrast.macos';
4
3
  import { AppearanceOptions } from '@fluentui-react-native/theme-types';
4
+ import { createAppleTheme } from '../createAppleTheme';
5
+
6
+ // For some reason the automatically mocked AccessibilityInfo object is the react-native version, not the
7
+ // react-native-macos version, which doesn't contain the isHighContrastEnabled function that is accessed in
8
+ // createAppleTheme. Use the actual module instead
9
+ jest.dontMock('react-native-macos/Libraries/Components/AccessibilityInfo/AccessibilityInfo');
5
10
 
6
- const macOsAliasTokensTable: [AppearanceOptions, boolean][] = [
11
+ const macOSAliasTokensTable: [AppearanceOptions, boolean][] = [
7
12
  ['light', true],
8
13
  ['light', false],
9
14
  ['dark', true],
@@ -23,7 +28,7 @@ it('IsHighContrast test', () => {
23
28
  expect(getIsHighContrast()).toBe(true);
24
29
  });
25
30
 
26
- it.concurrent.each(macOsAliasTokensTable)(
31
+ it.concurrent.each(macOSAliasTokensTable)(
27
32
  'createMacOSColorAliasTokens test mode: %s, isHighContrast: %p',
28
33
  async (mode: AppearanceOptions, isHighContrast: boolean) => {
29
34
  if (mode === 'highContrast') {
@@ -34,7 +39,7 @@ it.concurrent.each(macOsAliasTokensTable)(
34
39
  },
35
40
  );
36
41
 
37
- it.concurrent.each(macOsAliasTokensTable)(
42
+ it.concurrent.each(macOSAliasTokensTable)(
38
43
  'createMacOSShadowAliasTokens test mode: %s, isHighContrast: %p',
39
44
  async (mode: AppearanceOptions, isHighContrast: boolean) => {
40
45
  if (mode === 'highContrast') {