Courses
Vue Foundations Vue Fullstack Vue Enterprise
Articles
Latest Topics
More
Newsletter Sponsorship Discord About
The video for this lesson is currently being updated, please read the transcript instead.
Enterprise Vue > Lesson 89

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...

Courses
  • Vue Foundations
  • Vue Fullstack
  • Vue Enterprise
Articles
  • Latest
  • Topics
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

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

  • RSS
  • |
  • Atom