File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
packages/render/src/shared/utils Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -1149,6 +1149,25 @@ exports[`pretty > should print style properties per-line once they get too wide
1149
1149
"
1150
1150
` ;
1151
1151
1152
+ exports [` pretty > style attribute formatting > should work with an img element 1` ] = `
1153
+ "<img
1154
+ alt = " Stagg Electric Kettle"
1155
+ style = "
1156
+ border-radius:12px;
1157
+ border:none;
1158
+ display:block;
1159
+ object-fit:cover;
1160
+ outline:none;
1161
+ text-decoration:none;
1162
+ width:100%;
1163
+
1164
+ "
1165
+ height = " 288"
1166
+ src = " /static/stagg-eletric-kettle.jpg"
1167
+ />
1168
+ "
1169
+ ` ;
1170
+
1152
1171
exports [` wrapText() > should work with ending words that are larger than the max line size 1` ] = `
1153
1172
"Want to go
1154
1173
beyond the
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ describe('pretty', () => {
27
27
28
28
it . only ( 'should work with an img element' , ( ) => {
29
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" />' ;
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
31
expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
32
32
} ) ;
33
33
} ) ;
You can’t perform that action at this time.
0 commit comments