简体   繁体   English

@vue/cli 和单元测试

[英]@vue/cli and unit tests

I am running @vue/cli it is version 4.5.15.我正在运行@vue/cli,它是 4.5.15 版。 I am wanting to write some tests for my components when I run,我想在运行时为我的组件编写一些测试,

yarn test:unit

I get an error我收到一个错误

ERROR command "test:unit" does not exist.错误命令“test:unit”不存在。

Is there some further setup I need to get unit testing running?是否需要进行一些进一步的设置才能运行单元测试?

Run vue add @vue/unit-jest in the project route that seems to have got them running.在项目路径中运行vue add @vue/unit-jest似乎已经让它们运行了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM