Skip to content

Prop not updated when immediate watcher accessing it (async mode) #1140

Open
@rndmerle

Description

@rndmerle

Version

1.0.0-beta.29

Reproduction link

https://github.com/rndmerle/repro-vue-test-utils-sync/tree/setprops-watcher

Steps to reproduce

git clone -b setprops-watcher https://github.com/rndmerle/repro-vue-test-utils-sync.git

yarn && yarn test

What is expected?

Hello test passing, with logging on console:

foo undefined
foo xxx

What is actually happening?

Hello test not passing, with logging on console:

foo undefined

To make the test pass, either:

  • switch immediate to false (and uncomment created() content)
  • change the watcher handler function to make anything as long it's not accessing the foo prop

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