UNPKG

e2ed

Version:

E2E testing framework over Playwright

22 lines (21 loc) 660 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.assertValueIsNotNull = assertValueIsNotNull; exports.assertValueIsNull = assertValueIsNull; const error_1 = require("../error"); /** * Asserts that the value is not `null`. */ function assertValueIsNotNull(value, check, payload) { if (value === null) { throw new error_1.E2edError('Asserted value is null', { check, payload }); } } /** * Asserts that the value is `null`. */ function assertValueIsNull(value, check, payload) { if (value !== null) { throw new error_1.E2edError('Asserted value is not null', { check, payload, value }); } }