You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
605 B
19 lines
605 B
2 years ago
|
"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');
|
||
|
}
|
||
|
};
|
||
|
}
|