e2ed
Version:
E2E testing framework over Playwright
20 lines (19 loc) • 609 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertStringIsSameSite = assertStringIsSameSite;
const asserts_1 = require("../asserts");
/**
* Asserts that the string is cookie's sameSite property.
*/
function assertStringIsSameSite(string) {
const sameSite = string;
switch (sameSite) {
case 'Lax':
case 'None':
case 'Strict':
return;
// no default
}
// @ts-expect-error: unreachable code
(0, asserts_1.assertValueIsNever)(sameSite, 'sameSite has invalid value in exhaustiveness check', { sameSite });
}