Migrate ValuePair to vitest

This commit is contained in:
Matthias 2024-04-13 13:02:41 +02:00
parent ca50318d09
commit 64eea047ad
2 changed files with 11 additions and 12 deletions

View File

@ -1,12 +0,0 @@
import ValuePair from '@/components/general/ValuePair.vue';
describe('ValuePair.vue', () => {
it('Renders a message', () => {
const msg = 'Test description';
// https://github.com/cypress-io/cypress/issues/26628
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
cy.mount(ValuePair, { props: { description: msg } });
cy.get('label').contains(msg);
});
});

View File

@ -0,0 +1,11 @@
import ValuePair from '@/components/general/ValuePair.vue';
import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
describe('ValuePair.vue', () => {
it('Renders a message', async () => {
const msg = 'Test description';
const wrapper = mount(ValuePair, { props: { description: msg } });
expect(wrapper.find('label').text()).toContain(msg);
});
});