diff --git a/frontend/src/components/Template/ContentHeader/GdtAmount.spec.js b/frontend/src/components/Template/ContentHeader/GdtAmount.spec.js new file mode 100644 index 000000000..30ce85817 --- /dev/null +++ b/frontend/src/components/Template/ContentHeader/GdtAmount.spec.js @@ -0,0 +1,43 @@ +import { mount } from '@vue/test-utils' +import GdtAmount from './GdtAmount' + +const localVue = global.localVue + +const state = { + language: 'en', +} + +const mocks = { + $store: { + state, + }, + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $n: jest.fn((n) => n), +} + +const propsData = { + path: 'string', + GdtBalance: 123.45, + badgeShow: false, + showStatus: false, +} + +describe('GdtAmount', () => { + let wrapper + + const Wrapper = () => { + return mount(GdtAmount, { localVue, mocks, propsData }) + } + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders the component gdt-amount', () => { + expect(wrapper.find('div.gdt-amount').exists()).toBe(true) + }) + }) +}) diff --git a/frontend/src/components/Template/ContentHeader/GdtAmount.vue b/frontend/src/components/Template/ContentHeader/GdtAmount.vue index b066ff4c2..3c38a24fa 100644 --- a/frontend/src/components/Template/ContentHeader/GdtAmount.vue +++ b/frontend/src/components/Template/ContentHeader/GdtAmount.vue @@ -1,6 +1,6 @@