cloudrx
Version:
TypeScript library for streaming cloud provider events using RxJS with automatic persistence and replay capabilities
29 lines • 912 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.testId = testId;
exports.default = setup;
const events_1 = require("events");
function testId() {
return expect
.getState()
.currentTestName.replace(/[^a-zA-Z0-9_-]/g, '-')
.replace(/--+/g, '-');
}
async function setup(globalConfig) {
(0, events_1.setMaxListeners)(50);
const isVerbose = globalConfig.verbose || false;
const isSilent = globalConfig.silent || false;
if (isSilent) {
process.env.JEST_LOG_LEVEL = 'silent';
}
else if (isVerbose) {
process.env.JEST_LOG_LEVEL = 'debug';
}
else {
process.env.JEST_LOG_LEVEL = 'info';
}
if (!isSilent) {
console.log(`[Global Setup] Jest flags detected - verbose: ${isVerbose}, silent: ${isSilent}, log level: ${process.env.JEST_LOG_LEVEL}`);
}
}
//# sourceMappingURL=setup.js.map