UNPKG

expect-playwright

Version:

![Node.js CI](https://github.com/playwright-community/expect-playwright/workflows/Node.js%20CI/badge.svg) [![codecov](https://codecov.io/gh/playwright-community/expect-playwright/branch/master/graph/badge.svg?token=Eay491HC49)](https://codecov.io/gh/playw

21 lines (20 loc) 609 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const utils_1 = require("../utils"); const toBeChecked = async function (...args) { try { const [elementHandle] = await utils_1.getElementHandle(args, 0); const isChecked = await elementHandle.isChecked(); return { pass: isChecked, message: () => utils_1.getMessage(this, "toBeChecked", true, isChecked, ""), }; } catch (err) { return { pass: false, message: () => err.toString(), }; } }; exports.default = toBeChecked;