如何在 vue 组合 api 组件中使用 jest 进行单元测试? [英] How to unit testing with jest in vue composition api component?

查看:29
本文介绍了如何在 vue 组合 api 组件中使用 jest 进行单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 jest 为 vue.js 中的组合 API 组件编写单元测试.

但我无法访问组合 API 的 setup() 中的函数.

Indicator.vue