1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00
joplin/packages/app-desktop/integration-tests/util/setDarkMode.ts

10 lines
286 B
TypeScript
Raw Normal View History

import { ElectronApplication } from '@playwright/test';
const setDarkMode = (app: ElectronApplication, darkMode: boolean) => {
return app.evaluate(({ nativeTheme }, darkMode) => {
nativeTheme.themeSource = darkMode ? 'dark' : 'light';
}, darkMode);
};
export default setDarkMode;