I admit that I'm being pedantic here. I have a Mocha test in WebStorm and WebStorm is complaining about
it() not being a function type.
I have the
mocha-definitelyTyped library downloaded, and added to the
Running Mocha is fine. Why is WebStorm not resolving the
From the description of the inspection:
Navigate to the above referenced preference and make sure the
@types/mocha (this was changed in early 2019 from
mocha-DefinitelyTyped. Either is OK.) library is in the list (don't select it). If it is not in the list, click the
Download... button, find
mocha there, and add it. Then click the
Manage Scopes... button, find your test directory, click on the library column, and select the
@types/mocha entry. See the screenshot below.
©2020 All rights reserved.