lundi 28 août 2017

dynamically add test cases and suite in Mocha

var Mocha = require('mocha');
var Test = Mocha.Test;
var Suite = Mocha.Suite;

var mocha = new Mocha();
var suite = Suite.create(mocha.suite, 'Search Box');

suite.addTest(new Test('I\'m a dynamic test', function () {
    console.log("haha");
    browser.end();
}));

I assume addTest is for it - test cases, how do I add a describe inside suite

Is there official documentation for dynamic test that I can refer to?

Aucun commentaire:

Enregistrer un commentaire