Permalink
Browse files

Make unit tests behave

HFP-1000
  • Loading branch information...
thomasmars
thomasmars committed Apr 27, 2017
1 parent f1bd729 commit cbcccaeea8a3787edd751ca5e3ba224b8014bd22
Showing with 6 additions and 3 deletions.
  1. +6 −3 tests/views/audioRecorderView.test.js
@@ -2,6 +2,7 @@ import test from 'ava';
import Vue from 'vue';
import AudioRecorderView from '../../src/views/AudioRecorder.vue';
import Timer from '../../src/views/Timer.vue';
import VUMeter from '../../src/views/VUMeter.vue';
import State from '../../src/components/State';
const statusMessages = {};
@@ -15,7 +16,8 @@ const initialData = {
statusMessages,
l10n: {},
audioSrc: '',
audioFilename: ''
audioFilename: '',
avgMicFrequency: 0
};
AudioRecorderView.data = () => initialData;
@@ -25,7 +27,8 @@ test.beforeEach(t => {
t.context.vm = new Vue({
...AudioRecorderView,
components: {
timer: Timer
timer: Timer,
vuMeter: VUMeter
}
}).$mount();
});
@@ -73,4 +76,4 @@ test('change state to "RECORDING"', async t => {
// check that only 2 buttons are showing
t.is(el.querySelectorAll('.button').length, 3);
});
});
});

0 comments on commit cbcccae

Please sign in to comment.