Skip to content

Error in tests when stub teleport #1206

@tk-tim

Description

@tk-tim

Describe the bug
In version 11 and previous I could mock teleport globally and tests would pass. From version 12 they are failing or there is at least warn [Vue warn]: Unhandled error during execution of app errorHandler.

Mock:

import { config } from '@vue/test-utils';

config.global.stubs = {
  teleport: true,
};

To Reproduce
Steps to reproduce the behavior:

  1. Run pnpm test:unit
  2. Test will crush

Here is simplest vue project with this bug https://github.com/tk-tim/vue-datepicker-issue

Expected behavior
Test should pass, since I don't even use teleport. But it was also alright in v11 when I used prop :teleport="true".

Screenshots
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions