Skip to content

Commit 12b64db

Browse files
tests: add test case for production CSS configuration
1 parent 904ce88 commit 12b64db

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/generators/__tests__/utils/styleSupport.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ describe('styleSupport', () => {
2222
expect(ExtractUseProps.length).toEqual(2);
2323
});
2424

25+
it('generates production CSS configuration', () => {
26+
const gen = getMockGenerator();
27+
gen.isProd = true;
28+
const { ExtractUseProps, regExpForStyles } = style(gen, StylingType.CSS);
29+
expect(gen.dependencies).toEqual(['css-loader']);
30+
expect(regExpForStyles).toEqual('/.css$/');
31+
expect(ExtractUseProps.length).toEqual(1);
32+
});
33+
2534
it('generates SASS configuration', () => {
2635
const gen = getMockGenerator();
2736
const { ExtractUseProps, regExpForStyles } = style(gen, StylingType.SASS);

0 commit comments

Comments
 (0)