ember-cli-typescript
ember-cli-typescript copied to clipboard
start() function isn't in @types/ember-mocha
Hi,
It seems that a type for the start() function is missing from @types/ember-mocha here:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ember-mocha/index.d.ts
In the app I work on we've added the following as a workaround in a .d.ts file:
declare module "ember-mocha" {
export function start(): void
}
Version: @types/[email protected].
Thanks for opening this! If you like, one of us will be happy to mentor you through getting the change into DefinitelyTyped!
Sounds good.
On closer inspection the full type definition is actually this:
declare module "ember-mocha" {
interface StartOptions {
loadTests?: boolean
startTests?: boolean
}
export function start(options?: StartOptions): void
}
Could also add the definition for startTests() as it is also exported by ember-mocha:
declare module "ember-mocha" {
export function startTests(): void
}
ember-mocha has since been deprecated in favor of ember-qunit. People should switch to the maintained package. While PRs will still be accepted against the DefinitelyTyped definitions, I am closing this issue as no longer relevant. Thanks!