get the tests working

This commit is contained in:
Moriz Wahl 2022-07-19 15:45:18 +02:00
parent c2891cd048
commit 17e6589045
2 changed files with 24 additions and 11 deletions

View File

@ -6,6 +6,15 @@ const localVue = global.localVue
describe('ContributionForm', () => {
let wrapper
const propsData = {
value: {
id: null,
date: '',
memo: '',
amount: '',
},
}
const mocks = {
$t: jest.fn((t) => t),
$d: jest.fn((d) => d),
@ -20,6 +29,7 @@ describe('ContributionForm', () => {
return mount(ContributionForm, {
localVue,
mocks,
propsData,
})
}

View File

@ -8,17 +8,20 @@ const apolloQueryMock = jest.fn()
const apolloMutationMock = jest.fn()
apolloQueryMock.mockResolvedValue({
data: {
listContributions: [
{
id: 1555,
amount: '200',
memo: 'Fleisig, fleisig am Arbeiten mein Lieber Freund, 50 Zeichen sind viel',
createdAt: '2022-07-15T08:47:06.000Z',
deletedAt: null,
confirmedBy: null,
confirmedAt: null,
},
],
listContributions: {
contributionList: [
{
id: 1555,
amount: '200',
memo: 'Fleisig, fleisig am Arbeiten mein Lieber Freund, 50 Zeichen sind viel',
createdAt: '2022-07-15T08:47:06.000Z',
deletedAt: null,
confirmedBy: null,
confirmedAt: null,
},
],
contributionCount: 1,
},
},
})