Skip to content
Snippets Groups Projects
Commit 0df94e8e authored by Sverre Frogner Haugen's avatar Sverre Frogner Haugen
Browse files

Wrote rendering unit test for IncomeInfo component

parent d5dd8048
No related branches found
No related tags found
1 merge request!67Profile components unit tests
Pipeline #281179 passed
import { mount } from '@vue/test-utils';
import IncomeInfo from '@/components/profile/IncomeInfo.vue'
import { describe, it, expect, beforeEach } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
describe('IncomeInfo', () => {
beforeEach(() => {
setActivePinia(createPinia());
});
it('renders correctly', async () => {
const wrapper = mount(IncomeInfo);
expect(wrapper.exists()).toBe(true);
expect(wrapper.findAll('.input-field')).toHaveLength(3);
expect(wrapper.find('.save-button').exists()).toBe(true);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment