DefinitelyTyped/definitelytyped.github.io

Unnecessary *-tests.ts dependencies on "mocha" causing problems

cspotcode opened this issue · 1 comments

I would like to update the mocha declarations in a way that requires TS2.1. (for keyof) However, the tests for many other declarations in this repository reference mocha. They are unrelated to mocha; they do this solely so their test file can be structured like mocha tests (using describe and it calls) even though the tests will never be executed.

I would like to create a separate declaration for these situations. This way I can impose the TS2.1 requirement for my updated mocha declarations without affecting all these other, unrelated declarations.

Here's an example, types/webdriverio/webdriverio-tests.ts.

Currently it is:

/// <reference types="mocha" />
// ...
describe("webdriver.io page", () => {
    it("should have the right title - the good old callback way", () => {

I would like to change the <reference>:

/// <reference types="mocha-dt-shim" />

... where "mocha-dt-shim" will be an incomplete copy of the mocha declarations, compatible with TS 2.0, declaring the describe(), it(), etc functions that these other *-tests.ts files are expecting.

Is this the best approach? How can I suppress this declaration from being published to npm? Is there a better name? A better place to put it? Should I use <reference path= instead of <reference types=?

Any guidance is appreciated.

Sorry, wrong repository. My mistake.