Sep 25, 2017
0
Level 8
VueJS/Vuex Testing of Component built using Spark
I'm using Mocha/Chai/Avoriaz to test my Vue Components that are using data provided by Spark Global Variable.
Test runs fine on plain component that's not using Spark Data. So, I'm confident that my test setup is working as it should.
But when I try running tests on components built utilising Vuex Store,
import * as types from '../mutation-types'
const state = {
data: Spark.orders,
}
...I get `ReferenceError: Spark is not defined' error.
Can anyone point me in the right direction please?
Please or to participate in this conversation.