File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { asyncParser } from '../../src'
22
3- const css = `
3+ const rawCSS = `
44 button {
55 color: #ffffff;
66 width: 100px;
@@ -12,7 +12,7 @@ const css = `
1212 }
1313`
1414
15- const objectCss = {
15+ const expectedJSS = {
1616 button : {
1717 color : '#ffffff' ,
1818 width : '100px' ,
@@ -28,7 +28,7 @@ beforeAll(() => {
2828} )
2929
3030it ( 'should handle default config' , async ( ) => {
31- const result = await asyncParser ( css )
31+ const result = await asyncParser ( rawCSS )
3232
33- expect ( result ) . toEqual ( objectCss )
33+ expect ( result ) . toEqual ( expectedJSS )
3434} )
Original file line number Diff line number Diff line change 11import { syncParser , asyncParser } from '../src'
22
3- const css = `
3+ const rawCSS = `
44 button {
55 color: #ffffff;
66 width: 100px;
77 height: 70px;
88 }
99`
1010
11- const objectCss = {
11+ const expectedJSS = {
1212 button : {
1313 color : '#ffffff' ,
1414 width : '100px' ,
@@ -23,13 +23,13 @@ const options = {
2323}
2424
2525it ( 'sync parse from plain css to object' , ( ) => {
26- const result = syncParser ( css , options )
26+ const result = syncParser ( rawCSS , options )
2727
28- expect ( result ) . toEqual ( objectCss )
28+ expect ( result ) . toEqual ( expectedJSS )
2929} )
3030
3131it ( 'async parse from plain css to object' , async ( ) => {
32- const result = await asyncParser ( css , options )
32+ const result = await asyncParser ( rawCSS , options )
3333
34- expect ( result ) . toEqual ( objectCss )
34+ expect ( result ) . toEqual ( expectedJSS )
3535} )
Original file line number Diff line number Diff line change 11import { asyncParser } from '../../src'
22
3- const css = `
3+ const rawCSS = `
44 button {
55 color: #ffffff;
66 width: 100px;
@@ -12,7 +12,7 @@ const css = `
1212 }
1313`
1414
15- const objectCss = {
15+ const expectedJSS = {
1616 button : {
1717 color : '#ffffff' ,
1818 width : '100px' ,
@@ -28,7 +28,7 @@ beforeAll(() => {
2828} )
2929
3030it ( 'should handle postcssrc config' , async ( ) => {
31- const result = await asyncParser ( css )
31+ const result = await asyncParser ( rawCSS )
3232
33- expect ( result ) . toEqual ( objectCss )
33+ expect ( result ) . toEqual ( expectedJSS )
3434} )
You can’t perform that action at this time.
0 commit comments