DCzajkowski / vue-emoji-picker

Very simple, yet powerful, vue emoji picker 🎉🔥🚀
MIT License
331 stars 49 forks source link

Jest tests #47

Open szydloit opened 1 year ago

szydloit commented 1 year ago

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
--->

` it is caused by this line: ` slot-scope="{ events: { click: clickEvent } }"` any suggestions how to mock up this?
DCzajkowski commented 1 year ago

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 :)