Skip to content

Commit

Permalink
issue-1147: Add test for pretty print html
Browse files Browse the repository at this point in the history
  • Loading branch information
addisonssense committed May 9, 2019
1 parent 76afc50 commit 4aa9f79
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/specs/wrapper/html.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,21 @@ describeWithShallowAndMount('html', mountingMethod => {
const wrapper = mountingMethod(compiled)
expect(wrapper.html()).to.equal(expectedHtml)
})

it('returns a Wrappers HTML as a pretty printed string', () => {
const expectedHtml =
'<body>\n' +
' <div>\n' +
' <ul>\n' +
' <li></li>\n' +
' <li></li>\n' +
' </ul>\n' +
' </div>\n' +
'</body>'

const compiled = compileToFunctions(expectedHtml)
const wrapper = mountingMethod(compiled)
const options = { prettyPrint: true };
expect(wrapper.html(options)).to.equal(expectedHtml)
})
})

0 comments on commit 4aa9f79

Please sign in to comment.