add jest.fn((d)

This commit is contained in:
ogerly 2022-04-10 14:47:43 +02:00
parent 94382d9834
commit 50be004ce4
4 changed files with 4 additions and 6 deletions

View File

@ -9,6 +9,7 @@ const mocks = {
}, },
$tc: jest.fn((tc) => tc), $tc: jest.fn((tc) => tc),
$t: jest.fn((t) => t), $t: jest.fn((t) => t),
$d: jest.fn((d) => d),
} }
const propsData = { const propsData = {

View File

@ -13,6 +13,7 @@ const mocks = {
locale: 'en', locale: 'en',
}, },
$t: jest.fn((t) => t), $t: jest.fn((t) => t),
$d: jest.fn((d) => d),
$tc: jest.fn((tc) => tc), $tc: jest.fn((tc) => tc),
$apollo: { $apollo: {
mutate: mockAPIcall, mutate: mockAPIcall,

View File

@ -8,7 +8,7 @@
</b-col> </b-col>
<b-col cols="7"> <b-col cols="7">
<div class="gdd-transaction-list-item-date"> <div class="gdd-transaction-list-item-date">
{{ dateString }} {{ $d(new Date(this.date), 'long') }}
</div> </div>
</b-col> </b-col>
</b-row> </b-row>
@ -28,10 +28,5 @@ export default {
default: false, default: false,
}, },
}, },
computed: {
dateString() {
return this.$d(new Date(this.date), 'long')
},
},
} }
</script> </script>

View File

@ -12,6 +12,7 @@ const mocks = {
locale: 'en', locale: 'en',
}, },
$t: jest.fn((t) => t), $t: jest.fn((t) => t),
$d: jest.fn((d) => d),
$tc: jest.fn((tc) => tc), $tc: jest.fn((tc) => tc),
$apollo: { $apollo: {
query: apolloQueryMock, query: apolloQueryMock,