Skip to content

shallowMounted tests with globally registered components that have slot content display component registration errors #1116

@robokozo

Description

@robokozo

Version

1.0.0-beta.28

Reproduction link

https://github.com/robodude/shallow-test

Steps to reproduce

  1. Create a globally registered component (A) that has a slot.

  2. Use that component (A) in another component (B) which passes information via slot to (A)

  3. Test the component (B)

  4. Run unit tests

or

  1. Pull from repo link.

  2. Navigate to directory using command prompt

  3. npm ci

  4. npm run test:unit

What is expected?

Test passes without errors

What is actually happening?

Test passes with an error

console.error node_modules/vue/dist/vue.runtime.common.js:603 [Vue warn]: Unknown custom element: <HelloWorld> - did you register the component correctly? For recursive components, make sure to provide the "name" option.


The generated snapshot looks how I would have expected it to.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions