I have a code where certain tests will always fail in CI environment. I would like to disable them based on an environment condition.
How to programmatically skip a
It can be used to either statically to disable a test or entire suite, or dynamically skip it at runtime.
Here's an example runtime usage:
it('should only test in the correct environment', function() {
if (/* check test environment */) {
// make assertions
} else {
this.skip();
}
});