Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression issue in v1.1.3 with slot content evaluation #1923

Open
bponomarenko opened this issue Nov 8, 2021 · 2 comments
Open

Regression issue in v1.1.3 with slot content evaluation #1923

bponomarenko opened this issue Nov 8, 2021 · 2 comments
Labels

Comments

@bponomarenko
Copy link

Version

1.2.2

Reproduction link

github.com

Steps to reproduce

  • Install dependencies with npm install
  • Run test – npm run test

What is expected?

Test will successfully pass

What is actually happening?

Test is failing


Test would be failing unless @vue/test-utils downgraded to the v1.1.2 or lower, which makes me certain it was introduced in v1.1.3.

@bponomarenko
Copy link
Author

@xanf Hey Illya. Sorry for tagging you here, but it seems that changes in #1752 may be related to this issue. If you'll have time to look into it, that would be great. Maybe it would be easy for you to spot an issue, I'm quite new to this codebase.

@bponomarenko
Copy link
Author

Here is a unit test to reproduce the issue (when added to the setProps.spec.js)

  it.only('should preserve component instance references when setting properties with setProps', async () => {
    const SlotComponent = { template: '<div></div>' }
    const wrapper = mountingMethod(ComponentWithSlots, {
      slots: { default: SlotComponent }
    })
    expect(wrapper.vm.$slots.default[0].componentInstance).toBeDefined()
    // Doesn't matter which property to set, even non-defined one
    await wrapper.setProps({ test: true })
    // Should not depend on "setProps" calls
    expect(wrapper.vm.$slots.default[0].componentInstance).toBeDefined()
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants