nuxt-ava-e2e-unit-testing
nuxt-ava-e2e-unit-testing copied to clipboard
Snapshot doesn't work
Hi guys,
Thank you for your work and this setup 🙏 I have a problem with the AVA snapshots, the first test works but when I run it a second time I have an error.
First try
Second trial
My code, from Logo.spec.js file :
import { mount } from '@vue/test-utils';
import test from 'ava';
import Logo from '@/components/Logo.vue';
test('is a Vue instance', (t) => {
const wrapper = mount(Logo);
t.is(wrapper.isVueInstance(), true);
});
test('Logo.vue snapshot', (t) => {
const wrapper = mount(Logo);
t.snapshot({ html: wrapper.html() });
});
Do you have an idea?
Thank you