File tree Expand file tree Collapse file tree 2 files changed +18
-23
lines changed Expand file tree Collapse file tree 2 files changed +18
-23
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
// import { StyleProvider } from '../../cssinjs';
2
2
import { extractStyle } from '../index' ;
3
- // import { ConfigProvider } from '../../../components';
3
+ import { ConfigProvider } from '../../../components' ;
4
4
5
5
const testGreenColor = '#008000' ;
6
6
describe ( 'Static-Style-Extract' , ( ) => {
@@ -9,23 +9,23 @@ describe('Static-Style-Extract', () => {
9
9
expect ( cssText ) . not . toContain ( testGreenColor ) ;
10
10
expect ( cssText ) . toMatchSnapshot ( ) ;
11
11
} ) ;
12
- // it('should extract static styles with customTheme', () => {
13
- // const cssText = extractStyle(( node) => {
14
- // return(
15
- // <ConfigProvider
16
- // theme={{
17
- // token: {
18
- // colorPrimary: testGreenColor,
19
- // },
20
- // }}
21
- // >
22
- // {node}
23
- // </ConfigProvider>
24
- // );
25
- // });
26
- // expect(cssText).toContain(testGreenColor);
27
- // expect(cssText).toMatchSnapshot();
28
- // });
12
+ it ( 'should extract static styles with customTheme' , ( ) => {
13
+ const cssText = extractStyle ( node => {
14
+ return (
15
+ < ConfigProvider
16
+ theme = { {
17
+ token : {
18
+ colorPrimary : testGreenColor ,
19
+ } ,
20
+ } }
21
+ >
22
+ { node }
23
+ </ ConfigProvider >
24
+ ) ;
25
+ } ) ;
26
+ expect ( cssText ) . toContain ( testGreenColor ) ;
27
+ expect ( cssText ) . toMatchSnapshot ( ) ;
28
+ } ) ;
29
29
// it('with custom hashPriority', () => {
30
30
// const cssText = extractStyle(
31
31
// (node) => (
You can’t perform that action at this time.
0 commit comments