-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can tests be marked as Pending at runtime? #1101
Comments
Would be nice of you to help Yadda project cause the association beetween excellent mocha & yadda produce something great. |
So this is basically marking tests as "skipped" at runtime, right? Please see #946 and let me know if that does what you want. |
Old; reopen if necessary |
Hey, I'm searching for a similar functionality, to mark a test as skipped / pending depending on the result of previous test. Any hints on this? |
Hi, var featuresFiles = new Yadda.FeatureFileSearch('./test/features');
var nFeaturesFiles = featuresFiles.list().length;
featuresFiles.each(function(file, nFile) {
//console.log('Iniciamos el test');
featureFile(file, function(feature) {
scenarios(feature.scenarios, function(scenario) {
describe(scenario.title, function() {
before(function() {
if(infoTest[scenario.annotations.cp] && infoTest[scenario.annotations.cp].blocked){
this.pending = true;
this.skip();
}
//do staffs
});
//code
after(function(done){
if(this.failed || this.pending){
var blocked = (scenario.annotations.blocking)?JSON.parse(scenario.annotations.blocking) : [];
if(blocked.length){
blocked.map(function(test){
infoTest[test.cp].blocked = true;
});
}
}
}
//do staffs
}
}
} I hope this will help you |
Sounds like #1618 would work |
Is it possible to mark a test as pending while it's being executed? Something like
this.emit('pending')
orthis.pending = true
?The reason for this is that yadda executes multiple bdd steps per mocha test, and I've had a feature request to change the test to pending if one of the bdd steps hasn't been implemented.
Thanks.
The text was updated successfully, but these errors were encountered: