Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Vue Enterprise > Lesson 23

What is snapshot testing?

Continuing from the last video, our App component test now needs an assertion. Since the only output of this component is the rendered markup, let's make an assertion about that.

We can get the rendered markup by using the html() API method of the wrapper. Let's firstly console log that and see what it gives us.

tests/unit/client/App.vue

describe("App.vue", () => {
  it("should render correctly", () => {
    ...
    console.log(wrapper.html());
  });
});

Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom