Skip to content

Within 'setData' method computed variables are re-calculated, even if are not used in template #377

Closed
@lusarz

Description

@lusarz

Version

1.0.0-beta.10

Reproduction link

https://github.com/lusarz/vue-test-utils/commit/51cf7b5c10cd2010c26a21d7e9f2cca400faacd1

Steps to reproduce

Use wrapper.setData(...) method

What is expected?

Computed properties that are not truly used in template shouldn't be re-calculated.

By 'truly used' I mean variables that are not filtered out by v-if directive.

What is actually happening?

All computed properties are calculated. In some situations it cause Cannot read property ${property} of null kind of errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions