Skip to content

Vue 2 with composition api and script setup computed properties are not unwrapped in template #567

Open
@art-kc

Description

@art-kc

I tried to run tests with script setup and composition api.
Everything works except that computed properties and refs don't unwrap in a template

For example computed

const classes: ComputedRef<string> = computed( () => { return status-flag--${props.statusFlag}; });
will output in vue template as

{ "value": "status-flag--one", "effect": true }

Though if i call it from vue context

wrapper.vm.classes

It will return correct unwrapped value
status-flag--one

My dependencies are below
"@vue/test-utils": "1.3.6", "@vue/vue2-jest": "29.2.6", "jest": "29.7.0", "babel-jest": "29.7.0", "ts-jest": "29.2.5",

Has anyone experienced same issue? I've tried switching versions of dependencies but nothing helped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions