1 import { describe, jest } from '@jest/globals';
4 import { main } from './gen-themes';
5 import config from './themes.config';
7 describe('genThemes', () => {
8 it('generates the necessary shades for a button', async () => {
9 jest.spyOn(fs, 'writeFileSync');
10 await main(config[0]);
11 expect(fs.writeFileSync).toHaveBeenCalledTimes(1);
12 expect(fs.writeFileSync).toHaveBeenCalledWith(
13 './themes/dist/snow.theme.css',
14 expect.stringContaining(':root,\n' + '.ui-standard {\n' + ' --primary-minor-2: #f0edff;')