简体   繁体   English

Mocha钩子不仅在WebStorm中被部分识别

[英]Mocha hooks are not only partially recognised within WebStorm

Another beginner's Mocha question! 另一个初学者的摩卡问题! I'm struggling to get WebStorm to treat my Mocha hooks as such. 我正在努力让WebStorm像这样对待我的Mocha挂钩。 I have followed the guidelines here: https://www.jetbrains.com/help/webstorm/running-unit-tests-on-mocha.html 我在这里遵循了以下准则: https : //www.jetbrains.com/help/webstorm/running-unit-tests-on-mocha.html

I have followed the guidelines here: WebStorm not recognising Mocha describe() and it() 我在这里遵循了以下准则: WebStorm无法识别Mocha describe()和it()

I have looked at another project in which Mocha is recognized and believe I have configured it identically but still no luck. 我查看了另一个项目,该项目在Mocha中得到认可,并相信我已经对其进行了相同的配置,但仍然没有运气。

What I am seeing, is as follows: 我所看到的如下: 在此处输入图片说明

In which some of the hooks are recognized - for example, 'BeforeEach' and 'it', but others, such as 'before' and 'describe' are not. 在其中识别出某些钩子-例如,“ BeforeEach”和“ it”,但不能识别其他钩子,例如“ before”和“ describe”。

When I hover over Describe, I get: 当我将鼠标悬停在Describe上时,我得到:

在此处输入图片说明

When trying to configure run configurations, I'm unclear which to check: 尝试配置运行配置时,不清楚要检查哪个:

在此处输入图片说明

Try enabling @types/mocha in Settings | 尝试在“设置” |“设置”中启用@types/mocha Languages & Frameworks | 语言和框架| JavaScript | JavaScript | Libraries 图书馆

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

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