File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
packages/render/src/shared/utils Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,21 @@ describe('lenientParse()', () => {
16
16
17
17
describe ( 'pretty' , ( ) => {
18
18
it ( 'should prettify base doucment correctly' , ( ) => {
19
- const document = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head></head><body style="background-color:#fff;"><h1>whatever</h1><input placeholder="hello world"/></body></html>` ;
19
+ const document =
20
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head></head><body style="background-color:#fff;"><h1>whatever</h1><input placeholder="hello world"/></body></html>' ;
20
21
expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
21
22
} ) ;
22
23
23
- // it("should prettify Preview component's complex characters correctly", async () => {
24
- // const stripeHTML = await fs.readFile(
25
- // path.resolve(__dirname, './stripe-email.html'),
26
- // 'utf8',
27
- // );
28
- //
29
- // expect(await pretty(stripeHTML)).toMatchSnapshot();
30
- // });
31
- //
24
+ it ( 'should print properties per-line once they get too wide' , ( ) => {
25
+ const document =
26
+ '<div style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0"></div>' ;
27
+ expect ( pretty ( document , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
28
+ } ) ;
29
+
30
+ it ( "should prettify Preview component's complex characters correctly" , ( ) => {
31
+ expect ( pretty ( stripeHTML , { lineBreak : '\n' } ) ) . toMatchSnapshot ( ) ;
32
+ } ) ;
33
+
32
34
// test('if mso syntax does not wrap', async () => {
33
35
// expect(
34
36
// await pretty(
You can’t perform that action at this time.
0 commit comments