Skip to content

Commit d4601ce

Browse files
chore: removed unnecesary undefined
1 parent b9bdeed commit d4601ce

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/core/src/__tests__/controllers/ThemeController.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const mockedAppearance = Appearance as jest.Mocked<typeof Appearance>;
1414
describe('ThemeController', () => {
1515
beforeEach(() => {
1616
// Reset state before each test
17-
ThemeController.setThemeMode(undefined);
18-
ThemeController.setDefaultThemeMode(undefined);
19-
ThemeController.setThemeVariables(undefined);
17+
ThemeController.setThemeMode();
18+
ThemeController.setDefaultThemeMode();
19+
ThemeController.setThemeVariables();
2020
jest.clearAllMocks();
2121
});
2222

@@ -41,21 +41,21 @@ describe('ThemeController', () => {
4141

4242
it('should fall back to system theme when undefined and system is dark', () => {
4343
mockedAppearance.getColorScheme.mockReturnValue('dark');
44-
ThemeController.setThemeMode(undefined);
44+
ThemeController.setThemeMode();
4545
expect(ThemeController.state.themeMode).toBe('dark');
4646
expect(mockedAppearance.getColorScheme).toHaveBeenCalled();
4747
});
4848

4949
it('should fall back to system theme when undefined and system is light', () => {
5050
mockedAppearance.getColorScheme.mockReturnValue('light');
51-
ThemeController.setThemeMode(undefined);
51+
ThemeController.setThemeMode();
5252
expect(ThemeController.state.themeMode).toBe('light');
5353
expect(mockedAppearance.getColorScheme).toHaveBeenCalled();
5454
});
5555

5656
it('should default to light when system returns null', () => {
5757
mockedAppearance.getColorScheme.mockReturnValue(null);
58-
ThemeController.setThemeMode(undefined);
58+
ThemeController.setThemeMode();
5959
expect(ThemeController.state.themeMode).toBe('light');
6060
});
6161
});
@@ -75,7 +75,7 @@ describe('ThemeController', () => {
7575

7676
it('should set default theme mode to undefined and fall back to system', () => {
7777
mockedAppearance.getColorScheme.mockReturnValue('dark');
78-
ThemeController.setDefaultThemeMode(undefined);
78+
ThemeController.setDefaultThemeMode();
7979
expect(ThemeController.state.defaultThemeMode).toBeUndefined();
8080
expect(ThemeController.state.themeMode).toBe('dark');
8181
});

0 commit comments

Comments
 (0)