This repository has been archived on 2026-03-06. You can view files and clone it, but cannot push or open issues or pull requests.
todo/client/node_modules/@testing-library/jest-dom/dist/to-be-empty.js
2025-06-13 14:04:40 +08:00

17 lines
603 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.toBeEmpty = toBeEmpty;
var _utils = require("./utils");
function toBeEmpty(element) {
(0, _utils.deprecate)('toBeEmpty', 'Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM.');
(0, _utils.checkHtmlElement)(element, toBeEmpty, this);
return {
pass: element.innerHTML === '',
message: () => {
return [this.utils.matcherHint(`${this.isNot ? '.not' : ''}.toBeEmpty`, 'element', ''), '', 'Received:', ` ${this.utils.printReceived(element.innerHTML)}`].join('\n');
}
};
}