mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test emit of update-transaction after creation
This commit is contained in:
parent
c3457b409b
commit
2c74574f24
@ -23,11 +23,19 @@ describe('UserProfileTransactionList', () => {
|
|||||||
expect(wrapper.findComponent({ name: 'GddTransactionList' }).exists()).toBeTruthy()
|
expect(wrapper.findComponent({ name: 'GddTransactionList' }).exists()).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('emist update-transactions when update-transactions is called', async () => {
|
it('emits update-transactions after creation', () => {
|
||||||
wrapper.findComponent({ name: 'GddTransactionList' }).vm.$emit('update-transactions')
|
|
||||||
expect(wrapper.emitted('update-transactions')).toEqual(
|
expect(wrapper.emitted('update-transactions')).toEqual(
|
||||||
expect.arrayContaining([expect.arrayContaining([{ firstPage: 1, items: 25 }])]),
|
expect.arrayContaining([expect.arrayContaining([{ firstPage: 1, items: 25 }])]),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('emist update-transactions when update-transactions is called', () => {
|
||||||
|
wrapper
|
||||||
|
.findComponent({ name: 'GddTransactionList' })
|
||||||
|
.vm.$emit('update-transactions', { firstPage: 2, items: 25 })
|
||||||
|
expect(wrapper.emitted('update-transactions')).toEqual(
|
||||||
|
expect.arrayContaining([expect.arrayContaining([{ firstPage: 2, items: 25 }])]),
|
||||||
|
)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user