Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jest tests #47

Open
szydloit opened this issue Apr 13, 2023 · 1 comment
Open

Jest tests #47

szydloit opened this issue Apr 13, 2023 · 1 comment

Comments

@szydloit
Copy link

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?

@DCzajkowski
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants