Skip to content

Commit 4aa9f79

Browse files
committed
issue-1147: Add test for pretty print html
1 parent 76afc50 commit 4aa9f79

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: test/specs/wrapper/html.spec.js

+17
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,21 @@ describeWithShallowAndMount('html', mountingMethod => {
3939
const wrapper = mountingMethod(compiled)
4040
expect(wrapper.html()).to.equal(expectedHtml)
4141
})
42+
43+
it('returns a Wrappers HTML as a pretty printed string', () => {
44+
const expectedHtml =
45+
'<body>\n' +
46+
' <div>\n' +
47+
' <ul>\n' +
48+
' <li></li>\n' +
49+
' <li></li>\n' +
50+
' </ul>\n' +
51+
' </div>\n' +
52+
'</body>'
53+
54+
const compiled = compileToFunctions(expectedHtml)
55+
const wrapper = mountingMethod(compiled)
56+
const options = { prettyPrint: true };
57+
expect(wrapper.html(options)).to.equal(expectedHtml)
58+
})
4259
})

0 commit comments

Comments
 (0)