mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 07:39:24 +02:00
Added one basic unittest for component
This commit is contained in:
parent
a4ce093919
commit
083b7b8e2f
2 changed files with 17 additions and 0 deletions
|
@ -1,4 +1,11 @@
|
|||
// helper for testing action with expected mutations
|
||||
import Vue from 'vue'
|
||||
|
||||
export const render = (Component, propsData) => {
|
||||
const Constructor = Vue.extend(Component)
|
||||
return new Constructor({ propsData: propsData }).$mount()
|
||||
}
|
||||
|
||||
export const testAction = ({action, payload, params, expectedMutations, expectedActions}, done) => {
|
||||
let mutationsCount = 0
|
||||
let actionsCount = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue