From 362f439aaf058a63542c9f5310493da0ac215cb4 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 27 Sep 2021 12:58:56 +0200 Subject: [PATCH 1/2] fix: Warnings in Gdd Transaction List Spec --- .../views/Pages/AccountOverview/GddTransactionList.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js index 5af115546..5418ff3ba 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js @@ -54,7 +54,7 @@ describe('GddTransactionList', () => { await wrapper.setProps({ transactions: [ { - balance: '19.93', + balance: 19.93, date: '2021-05-25T17:38:13+00:00', memo: 'Alles Gute zum Geburtstag', name: 'Bob der Baumeister', @@ -63,7 +63,7 @@ describe('GddTransactionList', () => { decay: { balance: '0.5' }, }, { - balance: '1000', + balance: 1000, date: '2021-04-29T15:34:49+00:00', memo: 'Gut das du da bist!', name: 'Gradido Akademie', @@ -71,7 +71,7 @@ describe('GddTransactionList', () => { type: 'creation', }, { - balance: '314.98', + balance: 314.98, date: '2021-04-29T17:26:40+00:00', memo: 'Für das Fahrrad!', name: 'Jan Ulrich', From 01ea24099acfb98f3990d2db3ad9f215c051eb1c Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 27 Sep 2021 21:26:07 +0200 Subject: [PATCH 2/2] warnings throw errors when running unit tests --- frontend/test/testSetup.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/test/testSetup.js b/frontend/test/testSetup.js index 7005ff5be..daf862548 100644 --- a/frontend/test/testSetup.js +++ b/frontend/test/testSetup.js @@ -1,6 +1,7 @@ import { createLocalVue } from '@vue/test-utils' import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' import Vuex from 'vuex' +import Vue from 'vue' import { ValidationProvider, ValidationObserver, extend } from 'vee-validate' import * as rules from 'vee-validate/dist/rules' @@ -47,3 +48,8 @@ global.localVue.component('validation-provider', ValidationProvider) global.localVue.component('validation-observer', ValidationObserver) global.localVue.directive('click-outside', clickOutside) global.localVue.directive('focus', focus) + +// throw errors for vue warnings to force the programmers to take care about warnings +Vue.config.warnHandler = (w) => { + throw new Error(w) +}