CodeceptJS
CodeceptJS copied to clipboard
No TypeScript definitions for the Mochawesome helper
What are you trying to achieve?
Have TypeScript definitions for addMochawesomeContext.
What do you get instead?
There is no Mochawesome class in the typings directory.
Provide test source code if related
declare namespace CodeceptJS {
interface SupportObject { I: I }
interface Methods extends Mochawesome {}
interface I extends WithTranslation<Mochawesome> {}
namespace Translation {
interface Actions {}
}
}
Details
- CodeceptJS version: 3.2.3
- NodeJS Version: 16.13.0
- Operating System: Windows 10
I'd like to work on this if it is not picked. It would be great if you can give some hints on what to change :)
I just had the same problem. I have now added the following to the steps.d.ts.
class Mochawesome {
/**
* Use Mochawesome API inside a test.
*
* @param description - context string.
*/
addMochawesomeContext(description: string): void;
}
I don't know, should I make a pull request with it. I don't know what file it fits in and if it even meets the requirements here. 😊
@lucky7104 I guess it fits in here
https://github.com/codeceptjs/CodeceptJS/blob/3.x/typings/Mocha.d.ts