This is my code for a quasar component that I want to mock
emits: [
"buyer-protection",
...useDialogPluginComponent.emits
]
But I get the following error:
TypeError: _quasar.useDialogPluginComponent.emits is not iterable
I'd like to mock useQuasar and usePluginDialogComponent from the quasar module. I tried to mock them this way:
jest.mock('quasar', () => ({
useDialogPluginComponent: () => ({
emits: []
}),
useQuasar: () => ({
platform: {
is: {
desktop: true
}
}
})
}))
How can I mock these quasar components?