You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Types from mocha are only available to the test ts file that include this triple-slash reference.
Actual behavior:
Types from mocha are available to all the ts files in the project, including both prod code and test code.
This is unexpected. How do we prevent Mocha test types from accidentally getting into prod code?
The text was updated successfully, but these errors were encountered:
We're having the same problem with Jest, which declares even more ambient definitions than mocha: If one unit test does /// <reference types="mocha" />, then all the product code can suddenly access these definitions.
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.4.2
Code
/// <reference types="mocha" />
Expected behavior:
Types from mocha are only available to the test ts file that include this triple-slash reference.
Actual behavior:
Types from mocha are available to all the ts files in the project, including both prod code and test code.
This is unexpected. How do we prevent Mocha test types from accidentally getting into prod code?
The text was updated successfully, but these errors were encountered: