fix test, linting

This commit is contained in:
Moriz Wahl 2021-08-10 15:42:30 +02:00
parent 281a6beadd
commit ad12dd46f4
3 changed files with 25 additions and 17 deletions

View File

@ -145,9 +145,9 @@ export default {
},
async updateGdt() {
const result2 = await communityAPI.transactionsgdt(this.$store.state.sessionId)
console.log(' communityAPI.transactionsgdt')
console.log(result2.result)
console.log(result2.result.data.gdtEntries)
// console.log(' communityAPI.transactionsgdt')
// console.log(result2.result)
// console.log(result2.result.data.gdtEntries)
this.GdtBalance = Number(result2.result.data.gdtSum)
this.transactionsGdt = result2.result.data.gdtEntries
this.transactionGdtCount = result2.result.data.count

View File

@ -22,8 +22,6 @@
<small>{{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}</small>
</div>
<div v-if="gdt_entry_type_id === 7">{{ amount }} GDT * {{ factor }} = {{ gdt }}</div>
<div v-else>{{ amount }} {{ gdt }} GDT</div>
<small>

View File

@ -1,8 +1,18 @@
import { shallowMount } from '@vue/test-utils'
import { mount } from '@vue/test-utils'
import UserProfileTransactionList from './UserProfileTransactionList'
const localVue = global.localVue
const mutationObserverMock = jest.fn(function MutationObserver(callback) {
this.observe = jest.fn()
this.disconnect = jest.fn()
this.trigger = (mockedMutationsList) => {
callback(mockedMutationsList, this)
}
})
global.MutationObserver = mutationObserverMock
describe('UserProfileTransactionList', () => {
let wrapper
@ -12,7 +22,7 @@ describe('UserProfileTransactionList', () => {
}
const Wrapper = () => {
return shallowMount(UserProfileTransactionList, { localVue, mocks })
return mount(UserProfileTransactionList, { localVue, mocks })
}
describe('mount', () => {