In Js tests, mocha, chai and sinon are commonly exposed as global variables to save some import
, usually via karma plugins.
Installing mocha typings goes well, mocha describe
, it
... are correctly exposed as global variables with correct types.
However, trying to also expose chai and sinon typings as global vars (typings i --global --save-dev sinon
) yields me a :
typings ERR! message Attempted to compile "sinon" as a global module, but it looks like an external module.`
I tried to write a typings file myself, but I don't have access to those libs typings (import ?)...
Is it possible ? How should I do it ? And will it work with sinon-chai ?