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

Wrote unit test for InfoComponent

parent 8d6a6024
No related branches found
No related tags found
1 merge request!44General components testing
Pipeline #279194 passed
import { shallowMount } from '@vue/test-utils';
import InfoComponent from '@/components/InfoComponent.vue'
import { describe, it, expect } from 'vitest'
//Needs to be updated when the info component gets dynamic data instead of static data
describe('InfoComponent', () => {
it('renders the correct quote and total savings', () => {
const wrapper = shallowMount(InfoComponent);
const quote = wrapper.find('#Quote');
const totalSavings = wrapper.find('#TotalSavings');
expect(quote.text()).toBe('Sparetips: Sett av et jevnt beløp hver måned på sparekonto eller lignende.');
expect(totalSavings.text()).toBe('Våre brukere har spart til sammen 5000 nok');
});
});
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