Complete the code to import the snapshot testing utility from Vue Test Utils.
import { [1] } from '@vue/test-utils';
The mount function is used to render the component for snapshot testing.
Complete the code to create a snapshot test for the HelloWorld component.
test('renders correctly', () => { const wrapper = mount(HelloWorld); expect(wrapper.[1]()).toMatchSnapshot(); });
The html() method returns the rendered HTML string for snapshot comparison.
Fix the error in the snapshot test by completing the missing method call.
const wrapper = mount(MyComponent);
expect(wrapper.[1]()).toMatchSnapshot();The html() method returns the component's HTML for snapshot matching.
Fill both blanks to create a snapshot test that mounts the component and matches its HTML output.
import { [1] } from '@vue/test-utils'; test('snapshot test', () => { const wrapper = [2](MyComponent); expect(wrapper.html()).toMatchSnapshot(); });
Use mount to fully render the component for snapshot testing.
Fill all three blanks to write a snapshot test that imports mount, mounts the component, and asserts the snapshot.
import { [1] } from '@vue/test-utils'; const wrapper = [2](MyComponent); expect(wrapper.[3]()).toMatchSnapshot();
Import and use mount to render the component, then call html() to get the HTML for snapshot matching.