nuxt-ava-e2e-unit-testing icon indicating copy to clipboard operation
nuxt-ava-e2e-unit-testing copied to clipboard

Snapshot doesn't work

Open Flo2315 opened this issue 4 years ago • 0 comments

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 Capture d’écran 2021-02-22 à 15 15 47

Second trial Capture d’écran 2021-02-22 à 15 16 11

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

Flo2315 avatar Feb 22 '21 14:02 Flo2315