Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
714 views
in Technique[技术] by (71.8m points)

unit-testing - 在Vue上使用Mocha进行单元测试时,如何解决错误?(How can I solve error when unit testing with mocha on vue?)

I using mocha to do unit testing to my vuetify project

(我使用摩卡咖啡对vuetify项目进行单元测试)

I had install it.

(我已经安装了。)

So I run npm run test:unit , there exist error like this :

(所以我运行npm run test:unit ,存在这样的错误:)

npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

The full error like this :

(像这样的完整错误:)

在此处输入图片说明

How can I solve this error?

(我该如何解决这个错误?)

Note :

(注意事项 :)

when I first installed vuetify and tried unit testing, it worked.

(当我第一次安装vuetify并尝试进行单元测试时,它可以工作。)

no error

(没错)

after I edited some parts and ran the unit test, the above error appeared

(在我编辑了一些零件并运行了单元测试后,出现了以上错误)

how do i resolve this error?

(我该如何解决这个错误?)

Update :

(更新 :)

I have updated the version of vuetify.

(我已经更新了vuetify的版本。)

is that what caused this error?

(是什么导致了此错误?)

I am confused to solve this error.

(我很困惑要解决此错误。)

because all errors are located in the node-modules folder.

(因为所有错误都位于node-modules文件夹中。)

not in the component that I made

(不在我制作的组件中)

  ask by positive thinking translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...