Skip to content

Problem with beforeRouteUpdate in-Component Guard Test #2264

@BerniWittmann

Description

@BerniWittmann

Version

3.0.1

Reproduction link

https://github.com/BerniWittmann/vue-test-navigation-guard-reproduction

Steps to reproduce

Run the tests with npm run test:unit

What is expected?

The specs in tests/unit/Home.spec.js should pass and calling wrapper.vm.beforeRouteUpdate should call the component navigation guard beforeRouteUpdate

What is actually happening?

The specs fail, because wrapper.vm.beforeRouteUpdate yiels undefined


I already asked a question on stackoverflow (without any solution). After providing the minimal reproduction this appears to be a bug, that only happens with mocha chai (and maybe karma jasmine) , but not with jest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions