test that updating the timestamp emits update transactions

This commit is contained in:
Moriz Wahl 2021-10-22 08:25:40 +02:00
parent eff9d9fab6
commit 0e64ca444a
2 changed files with 8 additions and 5 deletions

View File

@ -35,5 +35,13 @@ describe('AccountOverview', () => {
it('has a transactions table', () => {
expect(wrapper.find('div.gdd-transaction-list').exists()).toBeTruthy()
})
describe('timestamp updates', () => {
it('emits update transactions', async () => {
expect(wrapper.emitted('update-transactions')).toHaveLength(1)
await wrapper.setData({ timestamp: Date.now() })
expect(wrapper.emitted('update-transactions')).toHaveLength(2)
})
})
})
})

View File

@ -54,11 +54,6 @@ export default {
data() {
return {
timestamp: Date.now(),
error: false,
errorResult: '',
loading: false,
datacollectionGdd: null,
datacollectionGdt: null,
}
},
props: {