Closed
Description
Hi!
I currently want to skip tests in runtime, so I just want to use the skip function of mocha, but it doesn't work with itParam.
my code snippet:
import "mocha";
import * as itParam from "mocha-param";
import { expect } from "chai";
...
describe("Test_XYZ", function() {
...
const iterationData = [....];
..
itParam("MyTest_${value.shortName}", iterationData, async function(data) {
if(condition)this.skip();
await someAsyncAssertMethod(data.number);
});
});
^ don't wonder, this is just example code :).
This throws the following error:
TypeError: Cannot read property 'skip' of undefined
Is there some workaround to access those mocha functions like skip, retries etc. ?
cheers
Metadata
Metadata
Assignees
Labels
No labels