Skip to content

Jest tests #47

@szydloit

Description

@szydloit

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions