vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.41k stars 9.58k forks source link

Using `vuex` with the latest version of `vue` has a broken hot reload test #2241

Open alecgibson opened 10 months ago

alecgibson commented 10 months ago

Version

4.1.0

Describe the bug

When developing with a fork of vuex, I noticed that vuex tests break when bumping vue to the latest version:

 FAIL  test/unit/hot-reload.spec.js
  ● Hot Reload › getters

    expect(received).toBe(expected) // Object.is equality

    Expected: 10
    Received: 1

      279 |     })
      280 |
    > 281 |     expect(vm.a).toBe(10)
          |                  ^
      282 |     store.dispatch('check', 10)
      283 |
      284 |     if (isSSR) {

      at Object.toBe (test/unit/hot-reload.spec.js:281:18)

Reproduction

  1. Check out vuejs/vuex main branch
  2. Run yarn test
  3. Tests pass
  4. Update vue: yarn add --dev vue@latest
  5. Run yarn test again
  6. Tests fail

Expected behavior

Tests pass on latest version of vue — presumably this means there's broken behaviour when using vuex with the latest version of vue?

Additional context

No response

Validations

alecgibson commented 10 months ago

Did a bit of investigating on version numbers at least, and it looks like this broke in vue@3.4.0. Tests pass fine in vue@3.3.13, but fail in vue@3.4.0