vue-emoji-picker
vue-emoji-picker copied to clipboard
Jest tests
While running a test:
import { shallowMount } from /'@vue/test-utils/';
import EmojiPicker from /'../EmojiPicker.vue/';
describe(/'EmojiPicker.vue/', () => {
it(/'renders a vue instance/', () => {
expect(
shallowMount(EmojiPicker, {
})
).toBeTruthy();
});
});
there's an error:
[Vue warn]: Error in render: \"TypeError: Cannot read properties of undefined (reading \'click\')\" found in ---> <VueEmojiPicker> <Anonymous> <Root>
it is caused by this line:
slot-scope="{ events: { click: clickEvent } }"
any suggestions how to mock up this?
Hey, I haven't used Vue for a few years at this point, so I am not sure what could be causing this. What I would suggest is you to view the source of this component and rewrite it so it can suit your needs :)