aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/controllers/__tests__/initNativeTheme.spec.ts')
-rw-r--r--packages/main/src/controllers/__tests__/initNativeTheme.spec.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts
index 16acca5..9107c78 100644
--- a/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts
+++ b/packages/main/src/controllers/__tests__/initNativeTheme.spec.ts
@@ -21,7 +21,7 @@
21import { jest } from '@jest/globals'; 21import { jest } from '@jest/globals';
22import { mocked } from 'jest-mock'; 22import { mocked } from 'jest-mock';
23 23
24import { createMainStore, MainStore } from '../../stores/MainStore'; 24import { sharedStore, SharedStore } from '../../stores/SharedStore';
25import type Disposer from '../../utils/Disposer'; 25import type Disposer from '../../utils/Disposer';
26 26
27let shouldUseDarkColors = false; 27let shouldUseDarkColors = false;
@@ -40,11 +40,11 @@ jest.unstable_mockModule('electron', () => ({
40const { nativeTheme } = await import('electron'); 40const { nativeTheme } = await import('electron');
41const { default: initNativeTheme } = await import('../initNativeTheme'); 41const { default: initNativeTheme } = await import('../initNativeTheme');
42 42
43let store: MainStore; 43let store: SharedStore;
44let disposeSut: Disposer; 44let disposeSut: Disposer;
45 45
46beforeEach(() => { 46beforeEach(() => {
47 store = createMainStore(); 47 store = sharedStore.create();
48 disposeSut = initNativeTheme(store); 48 disposeSut = initNativeTheme(store);
49}); 49});
50 50
@@ -53,7 +53,7 @@ it('should register a nativeTheme updated listener', () => {
53}); 53});
54 54
55it('should synchronize themeSource changes to the nativeTheme', () => { 55it('should synchronize themeSource changes to the nativeTheme', () => {
56 store.config.setThemeSource('dark'); 56 store.settings.setThemeSource('dark');
57 expect(nativeTheme.themeSource).toBe('dark'); 57 expect(nativeTheme.themeSource).toBe('dark');
58}); 58});
59 59
@@ -63,7 +63,7 @@ it('should synchronize shouldUseDarkColors changes to the store', () => {
63 )![1]; 63 )![1];
64 shouldUseDarkColors = true; 64 shouldUseDarkColors = true;
65 listener(); 65 listener();
66 expect(store.shared.shouldUseDarkColors).toBe(true); 66 expect(store.shouldUseDarkColors).toBe(true);
67}); 67});
68 68
69it('should remove the listener on dispose', () => { 69it('should remove the listener on dispose', () => {