cybernaut
Version:
Reliable, automated web UI testing in BDD-style.
29 lines • 760 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
function given(name, fn) {
describe('given ' + name, fn);
}
exports.given = given;
function when(name, fn) {
describe('when ' + name, fn);
}
exports.when = when;
function then(name, fn) {
test('then ' + name, fn);
}
exports.then = then;
function and(name, fn) {
describe('and ' + name, fn);
}
exports.and = and;
// This function works in conjunction with Jest fake timers.
function shortSleep() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
for (let i = 0; i < 10; i += 1) {
yield Promise.resolve();
}
});
}
exports.shortSleep = shortSleep;
//# sourceMappingURL=test-utils.js.map