-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from mr150/fix/jit-issues
Fix/jit issues
- Loading branch information
Showing
4 changed files
with
43 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ describe('JitEngine', () => { | |
@include testou.apply('C-ih'); | ||
`; | ||
|
||
/* eslint-disable */ | ||
const extractUtilsContent = ` | ||
<div class=" | ||
D-n | ||
|
@@ -40,15 +41,17 @@ md_Gc-s1 Pb6u Ps Lol5 md_Mxh130vh Ps | |
@:pfrm_-Try0 ^one_Bgc-$bgColor?#c06_h Ct-'id:';attr(id)_b | ||
"> | ||
Lorem Ipsum | ||
Lorem \`Ipsum\` | ||
</div> | ||
const wrapperCss = "M1u -Myvar12 Ps d-g"; | ||
const myStr = "simpl'e text" + ' testou' + "" + "[email protected]"; | ||
const wrapperCss = "M1u -Myvar12 \\"Ps\\" d-g"; | ||
<MyComponent className={cn('D-f Gap5u', wrapperCss)}/> | ||
`; | ||
<MyComponent className={cn('D-f \\'Gap5u', wrapperCss)}/> | ||
` + "\n<button className={`D-ib ${flag ? 'Bgc-red' : ''}`}>Clear</div>"; | ||
/* eslint-enable */ | ||
|
||
it('extract utils from content', async () => { | ||
it('extract utils from the content', async () => { | ||
const jit = new JitEngine(); | ||
await jit.init(); | ||
|
||
|
@@ -69,14 +72,17 @@ const wrapperCss = "M1u -Myvar12 Ps d-g"; | |
'M1u', | ||
'-Myvar12', | ||
'D-f', | ||
'Gap5u' | ||
'Gap5u', | ||
'Bgc-red', | ||
'D-ib', | ||
], | ||
); | ||
}); | ||
|
||
it('generate CSS from the file', async () => { | ||
const jit = new JitEngine(); | ||
await jit.init([sassInputPath, sassInputContent]); | ||
await jit.init(['BROKEN/PATH', 'NONE']); | ||
|
||
/* eslint-disable */ | ||
const cssOutput = `.C-ih { | ||
|