0👍
✅
Judging by the error it your dashboards
object which is not defined.
I don’t know how you create it or what it is, but if you want to try to mock in Vue-test-utils config file please note that global
doesn’t seem to be a valid config option, you might want to try:
config.mocks = {
global: {
dashboards: {
$filters: {
translate: (msg) => msg,
currency: (currency) => currency
},
$t: (text) => text
}
}
}
Alternatively Jest provide a way to define global variables that need to be available in all test in jest.config.js
:
// globals: {},
Source:stackexchange.com