mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
10 lines
286 B
TypeScript
10 lines
286 B
TypeScript
|
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;
|