tia
Version:
Time is All (logs driven test engine with ExtJs support)
81 lines • 2.01 kB
JavaScript
;
/* globals gIn: true */
Object.defineProperty(exports, "__esModule", { value: true });
/*
Low level utilities for tests.
*/
/**
* Sets passes count for current test.
* Can be used for debug.
*/
function setPassed(newCount) {
gIn.tracer.msg3(`Changing passed tests count to ${newCount}`);
gIn.tInfo.setPassed(newCount);
}
exports.setPassed = setPassed;
;
/**
* Sets fails count for current test.
* Can be used for debug.
*/
function setFailed(newCount) {
gIn.tracer.msg3(`Changing failed tests count to ${newCount}`);
gIn.tInfo.setFailed(newCount);
}
exports.setFailed = setFailed;
;
/**
* Gets passes count for current test.
*
* @returns {number}
*/
function getPassed() {
return gIn.tInfo.getPassed();
}
exports.getPassed = getPassed;
;
/**
* Gets fails count for current test.
* @returns {number}
*/
function getFailed() {
return gIn.tInfo.getFailed();
}
exports.getFailed = getFailed;
;
/**
* Enables/disables pass counting.
* It can be useful for high level functions creation.
*
* @param {boolean} enable - new value for pass counting.
* @returns {boolean} - old pass counting value.
*/
function setLlPassCounting(enable) {
const old = gIn.tInfo.getPassCountingEnabled();
gIn.tInfo.setPassCountingEnabled(enable);
return old;
}
exports.setLlPassCounting = setLlPassCounting;
;
function setLlPassPrinting(enable) {
const old = gIn.tInfo.getPassPrintingEnabled();
gIn.tInfo.setPassPrintingEnabled(enable);
return old;
}
exports.setLlPassPrinting = setLlPassPrinting;
;
/**
* Enables/disables low level actions logging.
* It can be useful for high level functions creation.
*
* @param {boolean} enable - new Log Action value.
* @returns {boolean} - old Log Action value.
*/
function setDefaultLlLogAction(enable) {
const old = gIn.loggerCfg.getDefLLLogAction();
gIn.loggerCfg.setDefLLLogAction(enable);
return old;
}
exports.setDefaultLlLogAction = setDefaultLlLogAction;
;
//# sourceMappingURL=low-level.js.map