File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
packages/render/src/shared/utils Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,18 @@ describe('pretty', () => {
1818 expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
1919 } ) ;
2020
21- it ( 'should print style properties per-line once they get too wide' , ( ) => {
22- const document =
23- '<div style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0;font-family:"Google Sans""></div>' ;
24- expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
21+ describe ( 'style attribute formatting' , ( ) => {
22+ it ( 'should print properties per-line once they get too wide' , ( ) => {
23+ const document =
24+ '<div style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0;font-family:"Google Sans""></div>' ;
25+ expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
26+ } ) ;
27+
28+ it . only ( 'should work with an img element' , ( ) => {
29+ const document =
30+ '<img alt="Stagg Electric Kettle" style="border-radius:12px;border:none;display:block;object-fit:cover;outline:none;text-decoration:none;width:100%;" height="288 src="/static/stagg-eletric-kettle.jpg" />' ;
31+ expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
32+ } ) ;
2533 } ) ;
2634
2735 it ( "should prettify Stripe's template correctly" , ( ) => {
You can’t perform that action at this time.
0 commit comments