mocha/index.d.ts file in this repo and had problems.mocha/index.d.ts.I'm attempting to use the retries callback for a test. The file compiles with no problem, but on runtime, the test fails and gives the error this.retries is not a function
Here's an example of my implementation
describe('suite name'), () => {
it('test declaration', () => {
this.retries(3)
}
}
Another note is that when I use this, I get no intellisense for that object. This is true for tests and suites.
Thanks and let me know if I can do anything else.
If you want to use Mocha features via this you need to use unbound functions not arrow functions, as documented: https://mochajs.org/#arrow-functions
Most helpful comment
If you want to use Mocha features via
thisyou need to use unbound functions not arrow functions, as documented: https://mochajs.org/#arrow-functions