e2ed
Version:
E2E testing framework over Playwright
31 lines (30 loc) • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertValueIsBoolean = assertValueIsBoolean;
exports.assertValueIsFalse = assertValueIsFalse;
exports.assertValueIsTrue = assertValueIsTrue;
const error_1 = require("../error");
/**
* Asserts that the value is boolean ('true` or `false`).
*/
function assertValueIsBoolean(value, check, payload) {
if (typeof value !== 'boolean') {
throw new error_1.E2edError('Asserted value is not a boolean', { check, payload, value });
}
}
/**
* Asserts that the value is `false` (strictly equal to `false`).
*/
function assertValueIsFalse(value, check, payload) {
if (value !== false) {
throw new error_1.E2edError('Asserted value is not false', { check, payload, value });
}
}
/**
* Asserts that the value is `true` (strictly equal to `true`).
*/
function assertValueIsTrue(value, check, payload) {
if (value !== true) {
throw new error_1.E2edError('Asserted value is not true', { check, payload, value });
}
}