How to test dark mode in XCUITest?

I want to take dark mode screenshots in XCUITest. How should I set dark/light environment variable?