Skip to content

Bug: PR 2327 introduces regression in vm #2557

@davidnixon

Description

@davidnixon

Describe the bug

This change
#2327
broke my test case.

To Reproduce

Pull this PR
carbon-design-system/carbon-components-vue#1662
Run
yarn test src/components/CvAccordion/__tests__/CvAccordion.spec.js

The change in the PR #2327 removes the visibility of componentRef in the vm. It maybe related to the component using defineExpose({ state }); which is not used elsewhere in our components.

Reverting the change on #2327 fixes the test case.

Expected behavior

    const acc = wrapper.findComponent(`.${carbonPrefix}--accordion`);
    expect(Boolean(acc.vm.componentRef)).toBe(true);

Related information:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions