@chtsinc/ch-playwright-report
Version:
Custom Playwright Reporter that logs test and execution results to MongoDB
19 lines • 709 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidationUtil = void 0;
const ch_logger_1 = require("@chtsinc/ch-logger");
const logger = (0, ch_logger_1.getLogger)();
class ValidationUtil {
static assertNotNull(value, name) {
if (value === null || value === undefined) {
logger.error(`CHPlaywrightReporter: Validation failed ${name} must be defined`);
throw new Error(`${name} is null or undefined.`);
}
return value;
}
static isNonEmptyString(value) {
return typeof value === "string" && value.trim() !== "";
}
}
exports.ValidationUtil = ValidationUtil;
//# sourceMappingURL=validation-util.js.map