Skip to content

wrapper.html() formatting #498

Closed
@tbuteler

Description

@tbuteler

I've got a bunch of tests that do something like this:

it('matches snapshot', () => {
    const wrapper = shallowMount(ExampleComponent)
    expect(wrapper.html()).toMatchSnapshot()
})

I've been trying out v2 and the snapshots all fail now because they were generated using v1, so my snapshotted HTML is all pretty-printed, whereas the wrapper.html() calls with v2 are not.

I was wondering if this was a regression, or if v2 is moving away from pretty-printing HTML (i.e. I should update my snapshots).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions