@najemi-software/vitest-dom 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PODXHY4M.js → chunk-LZZAJDBO.js} +59 -59
- package/dist/chunk-LZZAJDBO.js.map +1 -0
- package/dist/extend-expect.d.ts +9 -0
- package/dist/extend-expect.js +2 -2
- package/dist/extend-expect.js.map +1 -1
- package/dist/matchers-CEKfObS0.d.ts +661 -0
- package/dist/matchers.d.ts +3 -660
- package/dist/matchers.js +1 -1
- package/package.json +6 -10
- package/dist/chunk-PODXHY4M.js.map +0 -1
- package/extend-expect.d.ts +0 -9
- package/extend-expect.js +0 -1
- package/matchers.d.ts +0 -1
- package/matchers.js +0 -1
|
@@ -4,41 +4,10 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// src/matchers.ts
|
|
8
|
-
var matchers_exports = {};
|
|
9
|
-
__export(matchers_exports, {
|
|
10
|
-
toBeChecked: () => toBeChecked,
|
|
11
|
-
toBeDisabled: () => toBeDisabled,
|
|
12
|
-
toBeEmpty: () => toBeEmpty,
|
|
13
|
-
toBeEmptyDOMElement: () => toBeEmptyDOMElement,
|
|
14
|
-
toBeEnabled: () => toBeEnabled,
|
|
15
|
-
toBeInTheDOM: () => toBeInTheDOM,
|
|
16
|
-
toBeInTheDocument: () => toBeInTheDocument,
|
|
17
|
-
toBeInvalid: () => toBeInvalid,
|
|
18
|
-
toBePartiallyChecked: () => toBePartiallyChecked,
|
|
19
|
-
toBeRequired: () => toBeRequired,
|
|
20
|
-
toBeValid: () => toBeValid,
|
|
21
|
-
toBeVisible: () => toBeVisible,
|
|
22
|
-
toContainElement: () => toContainElement,
|
|
23
|
-
toContainHTML: () => toContainHTML,
|
|
24
|
-
toHaveAccessibleDescription: () => toHaveAccessibleDescription,
|
|
25
|
-
toHaveAccessibleName: () => toHaveAccessibleName,
|
|
26
|
-
toHaveAttribute: () => toHaveAttribute,
|
|
27
|
-
toHaveClass: () => toHaveClass,
|
|
28
|
-
toHaveDescription: () => toHaveDescription,
|
|
29
|
-
toHaveDisplayValue: () => toHaveDisplayValue,
|
|
30
|
-
toHaveErrorMessage: () => toHaveErrorMessage,
|
|
31
|
-
toHaveFocus: () => toHaveFocus,
|
|
32
|
-
toHaveFormValues: () => toHaveFormValues,
|
|
33
|
-
toHaveStyle: () => toHaveStyle,
|
|
34
|
-
toHaveTextContent: () => toHaveTextContent,
|
|
35
|
-
toHaveValue: () => toHaveValue
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// src/utils.ts
|
|
7
|
+
// src/matchers/utils.ts
|
|
39
8
|
import redent from "redent";
|
|
40
9
|
|
|
41
|
-
// src/css-parse.js
|
|
10
|
+
// src/matchers/css-parse.js
|
|
42
11
|
var commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
43
12
|
function cssParse(css, options) {
|
|
44
13
|
options = options || {};
|
|
@@ -423,7 +392,7 @@ function addParent(obj, parent) {
|
|
|
423
392
|
}
|
|
424
393
|
var css_parse_default = cssParse;
|
|
425
394
|
|
|
426
|
-
// src/utils.ts
|
|
395
|
+
// src/matchers/utils.ts
|
|
427
396
|
import isEqual from "lodash-es/isEqual.js";
|
|
428
397
|
import isFunction from "lodash-es/isFunction.js";
|
|
429
398
|
var GenericTypeError = class extends Error {
|
|
@@ -642,7 +611,7 @@ function getType(value) {
|
|
|
642
611
|
throw new Error(`value of unknown type: ${value}`);
|
|
643
612
|
}
|
|
644
613
|
|
|
645
|
-
// src/to-be-in-the-dom.js
|
|
614
|
+
// src/matchers/to-be-in-the-dom.js
|
|
646
615
|
function toBeInTheDOM(element, container) {
|
|
647
616
|
deprecate(
|
|
648
617
|
"toBeInTheDOM",
|
|
@@ -673,7 +642,7 @@ function toBeInTheDOM(element, container) {
|
|
|
673
642
|
};
|
|
674
643
|
}
|
|
675
644
|
|
|
676
|
-
// src/to-be-in-the-document.js
|
|
645
|
+
// src/matchers/to-be-in-the-document.js
|
|
677
646
|
function toBeInTheDocument(element) {
|
|
678
647
|
if (element !== null || !this.isNot) {
|
|
679
648
|
checkHtmlElement(element, toBeInTheDocument, this);
|
|
@@ -703,7 +672,7 @@ function toBeInTheDocument(element) {
|
|
|
703
672
|
};
|
|
704
673
|
}
|
|
705
674
|
|
|
706
|
-
// src/to-be-empty.js
|
|
675
|
+
// src/matchers/to-be-empty.js
|
|
707
676
|
function toBeEmpty(element) {
|
|
708
677
|
deprecate(
|
|
709
678
|
"toBeEmpty",
|
|
@@ -727,7 +696,7 @@ function toBeEmpty(element) {
|
|
|
727
696
|
};
|
|
728
697
|
}
|
|
729
698
|
|
|
730
|
-
// src/to-be-empty-dom-element.js
|
|
699
|
+
// src/matchers/to-be-empty-dom-element.js
|
|
731
700
|
function toBeEmptyDOMElement(element) {
|
|
732
701
|
checkHtmlElement(element, toBeEmptyDOMElement, this);
|
|
733
702
|
return {
|
|
@@ -753,7 +722,7 @@ function isEmptyElement(element) {
|
|
|
753
722
|
return nonCommentChildNodes.length === 0;
|
|
754
723
|
}
|
|
755
724
|
|
|
756
|
-
// src/to-contain-element.js
|
|
725
|
+
// src/matchers/to-contain-element.js
|
|
757
726
|
function toContainElement(container, element) {
|
|
758
727
|
checkHtmlElement(container, toContainElement, this);
|
|
759
728
|
if (element !== null) {
|
|
@@ -778,7 +747,7 @@ function toContainElement(container, element) {
|
|
|
778
747
|
};
|
|
779
748
|
}
|
|
780
749
|
|
|
781
|
-
// src/to-contain-html.js
|
|
750
|
+
// src/matchers/to-contain-html.js
|
|
782
751
|
function getNormalizedHtml(container, htmlText) {
|
|
783
752
|
const div = container.ownerDocument.createElement("div");
|
|
784
753
|
div.innerHTML = htmlText;
|
|
@@ -807,7 +776,7 @@ function toContainHTML(container, htmlText) {
|
|
|
807
776
|
};
|
|
808
777
|
}
|
|
809
778
|
|
|
810
|
-
// src/to-have-text-content.js
|
|
779
|
+
// src/matchers/to-have-text-content.js
|
|
811
780
|
function toHaveTextContent(node, checkWith, options = { normalizeWhitespace: true }) {
|
|
812
781
|
checkNode(node, toHaveTextContent, this);
|
|
813
782
|
const textContent = options.normalizeWhitespace ? normalize(node.textContent) : node.textContent.replace(/\u00a0/g, " ");
|
|
@@ -832,7 +801,7 @@ function toHaveTextContent(node, checkWith, options = { normalizeWhitespace: tru
|
|
|
832
801
|
};
|
|
833
802
|
}
|
|
834
803
|
|
|
835
|
-
// src/to-have-accessible-description.js
|
|
804
|
+
// src/matchers/to-have-accessible-description.js
|
|
836
805
|
import { computeAccessibleDescription } from "dom-accessibility-api";
|
|
837
806
|
function toHaveAccessibleDescription(htmlElement, expectedAccessibleDescription) {
|
|
838
807
|
checkHtmlElement(htmlElement, toHaveAccessibleDescription, this);
|
|
@@ -867,7 +836,7 @@ function toHaveAccessibleDescription(htmlElement, expectedAccessibleDescription)
|
|
|
867
836
|
};
|
|
868
837
|
}
|
|
869
838
|
|
|
870
|
-
// src/to-have-accessible-name.js
|
|
839
|
+
// src/matchers/to-have-accessible-name.js
|
|
871
840
|
import { computeAccessibleName } from "dom-accessibility-api";
|
|
872
841
|
function toHaveAccessibleName(htmlElement, expectedAccessibleName) {
|
|
873
842
|
checkHtmlElement(htmlElement, toHaveAccessibleName, this);
|
|
@@ -899,7 +868,7 @@ function toHaveAccessibleName(htmlElement, expectedAccessibleName) {
|
|
|
899
868
|
};
|
|
900
869
|
}
|
|
901
870
|
|
|
902
|
-
// src/to-have-attribute.js
|
|
871
|
+
// src/matchers/to-have-attribute.js
|
|
903
872
|
function printAttribute(stringify, name, value) {
|
|
904
873
|
return value === void 0 ? name : `${name}=${stringify(value)}`;
|
|
905
874
|
}
|
|
@@ -941,7 +910,7 @@ function toHaveAttribute(htmlElement, name, expectedValue) {
|
|
|
941
910
|
};
|
|
942
911
|
}
|
|
943
912
|
|
|
944
|
-
// src/to-have-class.js
|
|
913
|
+
// src/matchers/to-have-class.js
|
|
945
914
|
function getExpectedClassNamesAndOptions(params) {
|
|
946
915
|
const lastParam = params.pop();
|
|
947
916
|
let expectedClassNames, options;
|
|
@@ -1024,7 +993,7 @@ function toHaveClass(htmlElement, ...params) {
|
|
|
1024
993
|
};
|
|
1025
994
|
}
|
|
1026
995
|
|
|
1027
|
-
// src/to-have-style.js
|
|
996
|
+
// src/matchers/to-have-style.js
|
|
1028
997
|
import chalk from "chalk";
|
|
1029
998
|
function getStyleDeclaration(document, css) {
|
|
1030
999
|
const styles = {};
|
|
@@ -1070,7 +1039,7 @@ function toHaveStyle(htmlElement, css) {
|
|
|
1070
1039
|
};
|
|
1071
1040
|
}
|
|
1072
1041
|
|
|
1073
|
-
// src/to-have-focus.js
|
|
1042
|
+
// src/matchers/to-have-focus.js
|
|
1074
1043
|
function toHaveFocus(element) {
|
|
1075
1044
|
checkHtmlElement(element, toHaveFocus, this);
|
|
1076
1045
|
return {
|
|
@@ -1099,7 +1068,7 @@ function toHaveFocus(element) {
|
|
|
1099
1068
|
};
|
|
1100
1069
|
}
|
|
1101
1070
|
|
|
1102
|
-
// src/to-have-form-values.ts
|
|
1071
|
+
// src/matchers/to-have-form-values.ts
|
|
1103
1072
|
import escape from "css.escape";
|
|
1104
1073
|
import { isEqualWith, uniq } from "lodash-es";
|
|
1105
1074
|
function getMultiElementValue(elements) {
|
|
@@ -1173,7 +1142,7 @@ function toHaveFormValues(formElement, expectedValues) {
|
|
|
1173
1142
|
};
|
|
1174
1143
|
}
|
|
1175
1144
|
|
|
1176
|
-
// src/to-be-visible.js
|
|
1145
|
+
// src/matchers/to-be-visible.js
|
|
1177
1146
|
function isStyleVisible(element) {
|
|
1178
1147
|
const { getComputedStyle } = element.ownerDocument.defaultView;
|
|
1179
1148
|
const { display: display2, visibility, opacity } = getComputedStyle(element);
|
|
@@ -1213,7 +1182,7 @@ function toBeVisible(element) {
|
|
|
1213
1182
|
};
|
|
1214
1183
|
}
|
|
1215
1184
|
|
|
1216
|
-
// src/to-be-disabled.js
|
|
1185
|
+
// src/matchers/to-be-disabled.js
|
|
1217
1186
|
var FORM_TAGS = [
|
|
1218
1187
|
"fieldset",
|
|
1219
1188
|
"input",
|
|
@@ -1289,7 +1258,7 @@ function toBeEnabled(element) {
|
|
|
1289
1258
|
};
|
|
1290
1259
|
}
|
|
1291
1260
|
|
|
1292
|
-
// src/to-be-required.js
|
|
1261
|
+
// src/matchers/to-be-required.js
|
|
1293
1262
|
var FORM_TAGS2 = ["select", "textarea"];
|
|
1294
1263
|
var ARIA_FORM_TAGS = ["input", "select", "textarea"];
|
|
1295
1264
|
var UNSUPPORTED_INPUT_TYPES = [
|
|
@@ -1337,7 +1306,7 @@ function toBeRequired(element) {
|
|
|
1337
1306
|
};
|
|
1338
1307
|
}
|
|
1339
1308
|
|
|
1340
|
-
// src/to-be-invalid.js
|
|
1309
|
+
// src/matchers/to-be-invalid.js
|
|
1341
1310
|
var FORM_TAGS3 = ["form", "input", "select", "textarea"];
|
|
1342
1311
|
function isElementHavingAriaInvalid(element) {
|
|
1343
1312
|
return element.hasAttribute("aria-invalid") && element.getAttribute("aria-invalid") !== "false";
|
|
@@ -1394,7 +1363,7 @@ function toBeValid(element) {
|
|
|
1394
1363
|
};
|
|
1395
1364
|
}
|
|
1396
1365
|
|
|
1397
|
-
// src/to-have-value.js
|
|
1366
|
+
// src/matchers/to-have-value.js
|
|
1398
1367
|
import { isEqualWith as isEqualWith2 } from "lodash-es";
|
|
1399
1368
|
function toHaveValue(htmlElement, expectedValue) {
|
|
1400
1369
|
checkHtmlElement(htmlElement, toHaveValue, this);
|
|
@@ -1432,7 +1401,7 @@ function toHaveValue(htmlElement, expectedValue) {
|
|
|
1432
1401
|
};
|
|
1433
1402
|
}
|
|
1434
1403
|
|
|
1435
|
-
// src/to-have-display-value.js
|
|
1404
|
+
// src/matchers/to-have-display-value.js
|
|
1436
1405
|
function toHaveDisplayValue(htmlElement, expectedValue) {
|
|
1437
1406
|
checkHtmlElement(htmlElement, toHaveDisplayValue, this);
|
|
1438
1407
|
const tagName = htmlElement.tagName.toLowerCase();
|
|
@@ -1478,7 +1447,7 @@ function getExpectedValues(expectedValue) {
|
|
|
1478
1447
|
return expectedValue instanceof Array ? expectedValue : [expectedValue];
|
|
1479
1448
|
}
|
|
1480
1449
|
|
|
1481
|
-
// src/to-be-checked.js
|
|
1450
|
+
// src/matchers/to-be-checked.js
|
|
1482
1451
|
import { createRequire } from "module";
|
|
1483
1452
|
var require2 = createRequire(import.meta.url);
|
|
1484
1453
|
var { roles } = require2("aria-query");
|
|
@@ -1531,7 +1500,7 @@ function roleSupportsChecked(role) {
|
|
|
1531
1500
|
return roles.get(role)?.props["aria-checked"] !== void 0;
|
|
1532
1501
|
}
|
|
1533
1502
|
|
|
1534
|
-
// src/to-be-partially-checked.js
|
|
1503
|
+
// src/matchers/to-be-partially-checked.js
|
|
1535
1504
|
function toBePartiallyChecked(element) {
|
|
1536
1505
|
checkHtmlElement(element, toBePartiallyChecked, this);
|
|
1537
1506
|
const isValidInput = () => {
|
|
@@ -1571,7 +1540,7 @@ function toBePartiallyChecked(element) {
|
|
|
1571
1540
|
};
|
|
1572
1541
|
}
|
|
1573
1542
|
|
|
1574
|
-
// src/to-have-description.js
|
|
1543
|
+
// src/matchers/to-have-description.js
|
|
1575
1544
|
function toHaveDescription(htmlElement, checkWith) {
|
|
1576
1545
|
deprecate("toHaveDescription", "Please use toHaveAccessibleDescription.");
|
|
1577
1546
|
checkHtmlElement(htmlElement, toHaveDescription, this);
|
|
@@ -1606,7 +1575,7 @@ function toHaveDescription(htmlElement, checkWith) {
|
|
|
1606
1575
|
};
|
|
1607
1576
|
}
|
|
1608
1577
|
|
|
1609
|
-
// src/to-have-errormessage.js
|
|
1578
|
+
// src/matchers/to-have-errormessage.js
|
|
1610
1579
|
function toHaveErrorMessage(htmlElement, checkWith) {
|
|
1611
1580
|
checkHtmlElement(htmlElement, toHaveErrorMessage, this);
|
|
1612
1581
|
if (!htmlElement.hasAttribute("aria-invalid") || htmlElement.getAttribute("aria-invalid") === "false") {
|
|
@@ -1656,6 +1625,37 @@ function toHaveErrorMessage(htmlElement, checkWith) {
|
|
|
1656
1625
|
};
|
|
1657
1626
|
}
|
|
1658
1627
|
|
|
1628
|
+
// src/matchers/matchers.ts
|
|
1629
|
+
var matchers_exports = {};
|
|
1630
|
+
__export(matchers_exports, {
|
|
1631
|
+
toBeChecked: () => toBeChecked,
|
|
1632
|
+
toBeDisabled: () => toBeDisabled,
|
|
1633
|
+
toBeEmpty: () => toBeEmpty,
|
|
1634
|
+
toBeEmptyDOMElement: () => toBeEmptyDOMElement,
|
|
1635
|
+
toBeEnabled: () => toBeEnabled,
|
|
1636
|
+
toBeInTheDOM: () => toBeInTheDOM,
|
|
1637
|
+
toBeInTheDocument: () => toBeInTheDocument,
|
|
1638
|
+
toBeInvalid: () => toBeInvalid,
|
|
1639
|
+
toBePartiallyChecked: () => toBePartiallyChecked,
|
|
1640
|
+
toBeRequired: () => toBeRequired,
|
|
1641
|
+
toBeValid: () => toBeValid,
|
|
1642
|
+
toBeVisible: () => toBeVisible,
|
|
1643
|
+
toContainElement: () => toContainElement,
|
|
1644
|
+
toContainHTML: () => toContainHTML,
|
|
1645
|
+
toHaveAccessibleDescription: () => toHaveAccessibleDescription,
|
|
1646
|
+
toHaveAccessibleName: () => toHaveAccessibleName,
|
|
1647
|
+
toHaveAttribute: () => toHaveAttribute,
|
|
1648
|
+
toHaveClass: () => toHaveClass,
|
|
1649
|
+
toHaveDescription: () => toHaveDescription,
|
|
1650
|
+
toHaveDisplayValue: () => toHaveDisplayValue,
|
|
1651
|
+
toHaveErrorMessage: () => toHaveErrorMessage,
|
|
1652
|
+
toHaveFocus: () => toHaveFocus,
|
|
1653
|
+
toHaveFormValues: () => toHaveFormValues,
|
|
1654
|
+
toHaveStyle: () => toHaveStyle,
|
|
1655
|
+
toHaveTextContent: () => toHaveTextContent,
|
|
1656
|
+
toHaveValue: () => toHaveValue
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
1659
|
export {
|
|
1660
1660
|
toBeInTheDOM,
|
|
1661
1661
|
toBeInTheDocument,
|
|
@@ -1685,4 +1685,4 @@ export {
|
|
|
1685
1685
|
toHaveErrorMessage,
|
|
1686
1686
|
matchers_exports
|
|
1687
1687
|
};
|
|
1688
|
-
//# sourceMappingURL=chunk-
|
|
1688
|
+
//# sourceMappingURL=chunk-LZZAJDBO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/matchers/utils.ts","../src/matchers/css-parse.js","../src/matchers/to-be-in-the-dom.js","../src/matchers/to-be-in-the-document.js","../src/matchers/to-be-empty.js","../src/matchers/to-be-empty-dom-element.js","../src/matchers/to-contain-element.js","../src/matchers/to-contain-html.js","../src/matchers/to-have-text-content.js","../src/matchers/to-have-accessible-description.js","../src/matchers/to-have-accessible-name.js","../src/matchers/to-have-attribute.js","../src/matchers/to-have-class.js","../src/matchers/to-have-style.js","../src/matchers/to-have-focus.js","../src/matchers/to-have-form-values.ts","../src/matchers/to-be-visible.js","../src/matchers/to-be-disabled.js","../src/matchers/to-be-required.js","../src/matchers/to-be-invalid.js","../src/matchers/to-have-value.js","../src/matchers/to-have-display-value.js","../src/matchers/to-be-checked.js","../src/matchers/to-be-partially-checked.js","../src/matchers/to-have-description.js","../src/matchers/to-have-errormessage.js","../src/matchers/matchers.ts"],"sourcesContent":["import redent from \"redent\";\nimport cssParse from \"./css-parse\";\nimport isEqual from \"lodash-es/isEqual.js\";\nimport isFunction from \"lodash-es/isFunction.js\";\nimport type { MatcherFn, MatcherState } from \"./types\";\n\ntype ErrorUtils = MatcherState[\"utils\"];\n\nclass GenericTypeError<State extends MatcherState> extends Error {\n constructor(\n expectedString: string,\n received: HTMLElement,\n matcherFn: MatcherFn<State>,\n context: State,\n ) {\n super();\n\n const printWithType =\n \"printWithType\" in context.utils &&\n isFunction(context.utils.printWithType)\n ? context.utils.printWithType\n : _printWithType;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, matcherFn);\n }\n let withType = \"\";\n try {\n withType = printWithType(\n \"Received\",\n received,\n context.utils.printReceived,\n );\n } catch (e) {\n // Can throw for Document:\n // https://github.com/jsdom/jsdom/issues/2304\n }\n this.message = [\n context.utils.matcherHint(\n `${context.isNot ? \".not\" : \"\"}.${matcherFn.name}`,\n \"received\",\n \"\",\n ),\n \"\",\n `${context.utils.RECEIVED_COLOR(\n \"received\",\n )} value must ${expectedString}.`,\n withType,\n ].join(\"\\n\");\n }\n}\n\nclass HtmlElementTypeError<\n State extends MatcherState = any,\n> extends GenericTypeError<State> {\n constructor(\n element: HTMLElement,\n matcherFn: MatcherFn<State>,\n context: State,\n ) {\n super(\"be an HTMLElement or an SVGElement\", element, matcherFn, context);\n }\n}\n\nclass NodeTypeError<\n State extends MatcherState = any,\n> extends GenericTypeError<State> {\n constructor(\n element: HTMLElement,\n matcherFn: MatcherFn<State>,\n context: State,\n ) {\n super(\"be a Node\", element, matcherFn, context);\n }\n}\n\nfunction checkHasWindow<State extends MatcherState>(\n htmlElement: HTMLElement,\n ErrorClass: typeof HtmlElementTypeError<State> | typeof NodeTypeError<State>,\n matcherFn: MatcherFn<State>,\n context: State,\n): asserts htmlElement is HTMLElement & {\n ownerDocument: Document & { defaultView: Window };\n} {\n if (\n !htmlElement ||\n !htmlElement.ownerDocument ||\n !htmlElement.ownerDocument.defaultView\n ) {\n throw new ErrorClass(htmlElement, matcherFn, context);\n }\n}\n\nfunction checkNode<State extends MatcherState = any>(\n node: HTMLElement,\n matcherFn: MatcherFn,\n context: State,\n) {\n checkHasWindow(node, NodeTypeError, matcherFn, context);\n const window = node.ownerDocument.defaultView;\n if (!(node instanceof window!.Node)) {\n throw new NodeTypeError(node, matcherFn, context);\n }\n}\n\nfunction checkHtmlElement<State extends MatcherState>(\n htmlElement: HTMLElement,\n matcher: MatcherFn<State>,\n context: State,\n) {\n checkHasWindow(htmlElement, HtmlElementTypeError, matcher, context);\n const window = htmlElement.ownerDocument.defaultView;\n\n if (\n !(htmlElement instanceof window.HTMLElement) &&\n // @ts-expect-error\n !(htmlElement instanceof window.SVGElement)\n ) {\n throw new HtmlElementTypeError(htmlElement, matcher, context);\n }\n}\n\nclass InvalidCSSError<State extends MatcherState> extends Error {\n constructor(\n received: {\n message: string;\n css: string;\n },\n matcherFn: MatcherFn,\n context: State,\n ) {\n super();\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, matcherFn);\n }\n this.message = [\n received.message,\n \"\",\n context.utils.RECEIVED_COLOR(`Failing css:`),\n context.utils.RECEIVED_COLOR(`${received.css}`),\n ].join(\"\\n\");\n }\n}\n\nfunction parseCSS<State extends MatcherState>(\n css: string,\n matcherFn: MatcherFn,\n context: State,\n) {\n const ast = cssParse(`selector { ${css} }`, { silent: true }).stylesheet;\n\n if (ast.parsingErrors && ast.parsingErrors.length > 0) {\n const { reason, line } = ast.parsingErrors[0];\n\n throw new InvalidCSSError(\n {\n css,\n message: `Syntax error parsing expected css: ${reason} on line: ${line}`,\n },\n matcherFn,\n context,\n );\n }\n\n const parsedRules = (ast.rules[0].declarations as any[])\n .filter((d: any) => d.type === \"declaration\")\n .reduce(\n (obj: any, { property, value }) =>\n Object.assign(obj, { [property]: value }),\n {} as Record<\"property\" | \"value\", string>,\n );\n return parsedRules;\n}\n\nfunction display(context: MatcherState, value: unknown) {\n return typeof value === \"string\" ? value : context.utils.stringify(value);\n}\n\nfunction getMessage(\n context: MatcherState,\n matcher: string,\n expectedLabel: string,\n expectedValue: any,\n receivedLabel: string,\n receivedValue: any,\n) {\n return [\n `${matcher}\\n`,\n `${expectedLabel}:\\n${context.utils.EXPECTED_COLOR(\n redent(display(context, expectedValue), 2),\n )}`,\n `${receivedLabel}:\\n${context.utils.RECEIVED_COLOR(\n redent(display(context, receivedValue), 2),\n )}`,\n ].join(\"\\n\");\n}\n\nfunction matches(textToMatch: string, matcher: MatcherFn) {\n if (matcher instanceof RegExp) {\n return matcher.test(textToMatch);\n } else {\n return textToMatch.includes(String(matcher));\n }\n}\n\nfunction deprecate(name: string, replacementText: string) {\n // Notify user that they are using deprecated functionality.\n // eslint-disable-next-line no-console\n console.warn(\n `Warning: ${name} has been deprecated and will be removed in future updates.`,\n replacementText,\n );\n}\n\nfunction normalize(text: string) {\n return text.replace(/\\s+/g, \" \").trim();\n}\n\nfunction getTag(element: Element) {\n return element.tagName && element.tagName.toLowerCase();\n}\n\nfunction getSelectValue({ multiple, options }: HTMLSelectElement) {\n const selectedOptions = [...options].filter((option) => option.selected);\n\n if (multiple) {\n return [...selectedOptions].map((opt) => opt.value);\n }\n\n if (selectedOptions.length === 0) {\n return undefined; // Couldn't make this happen, but just in case\n }\n return selectedOptions[0].value;\n}\n\nfunction getInputValue(inputElement: HTMLInputElement) {\n switch (inputElement.type) {\n case \"number\":\n return inputElement.value === \"\" ? null : Number(inputElement.value);\n case \"checkbox\":\n return inputElement.checked;\n default:\n return inputElement.value;\n }\n}\n\nfunction getSingleElementValue(element: undefined | null): undefined;\nfunction getSingleElementValue(\n element: HTMLInputElement,\n): ReturnType<typeof getInputValue>;\nfunction getSingleElementValue(\n element: HTMLSelectElement,\n): ReturnType<typeof getSelectValue>;\nfunction getSingleElementValue(\n element: HTMLMeterElement | HTMLProgressElement,\n): number;\nfunction getSingleElementValue(\n element:\n | HTMLButtonElement\n | HTMLDataElement\n | HTMLOptionElement\n | HTMLOutputElement\n | HTMLTextAreaElement,\n): string;\nfunction getSingleElementValue(\n element: Element,\n): undefined | string | string[] | number | boolean | null;\n\nfunction getSingleElementValue(element: Element | undefined | null) {\n if (!element) {\n return undefined;\n }\n switch (element.tagName.toLowerCase()) {\n case \"input\":\n return getInputValue(element as HTMLInputElement);\n case \"select\":\n return getSelectValue(element as HTMLSelectElement);\n default:\n return (element as any).value;\n }\n}\n\nfunction compareArraysAsSet(a: unknown, b: unknown) {\n if (Array.isArray(a) && Array.isArray(b)) {\n return isEqual(new Set(a), new Set(b));\n }\n return undefined;\n}\n\nfunction toSentence(\n array: string[],\n { wordConnector = \", \", lastWordConnector = \" and \" } = {},\n) {\n return [array.slice(0, -1).join(wordConnector), array[array.length - 1]].join(\n array.length > 1 ? lastWordConnector : \"\",\n );\n}\n\nexport {\n HtmlElementTypeError,\n NodeTypeError,\n checkHtmlElement,\n checkNode,\n parseCSS,\n deprecate,\n getMessage,\n matches,\n normalize,\n getTag,\n getSingleElementValue,\n compareArraysAsSet,\n toSentence,\n};\n\nfunction _printWithType<T>(\n name: string,\n value: T,\n print: (value: T) => string,\n): string {\n const type = getType(value);\n const hasType =\n type !== \"null\" && type !== \"undefined\"\n ? `${name} has type: ${type}\\n`\n : \"\";\n const hasValue = `${name} has value: ${print(value)}`;\n return hasType + hasValue;\n}\n\n/**\n * https://github.com/jestjs/jest/blob/main/packages/jest-get-type/src/index.ts\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\ntype ValueType =\n | \"array\"\n | \"bigint\"\n | \"boolean\"\n | \"function\"\n | \"null\"\n | \"number\"\n | \"object\"\n | \"regexp\"\n | \"map\"\n | \"set\"\n | \"date\"\n | \"string\"\n | \"symbol\"\n | \"undefined\";\n\n// get the type of a value with handling the edge cases like `typeof []`\n// and `typeof null`\nexport function getType(value: unknown): ValueType {\n if (value === undefined) {\n return \"undefined\";\n } else if (value === null) {\n return \"null\";\n } else if (Array.isArray(value)) {\n return \"array\";\n } else if (typeof value === \"boolean\") {\n return \"boolean\";\n } else if (typeof value === \"function\") {\n return \"function\";\n } else if (typeof value === \"number\") {\n return \"number\";\n } else if (typeof value === \"string\") {\n return \"string\";\n } else if (typeof value === \"bigint\") {\n return \"bigint\";\n } else if (typeof value === \"object\") {\n if (value != null) {\n if (value.constructor === RegExp) {\n return \"regexp\";\n } else if (value.constructor === Map) {\n return \"map\";\n } else if (value.constructor === Set) {\n return \"set\";\n } else if (value.constructor === Date) {\n return \"date\";\n }\n }\n return \"object\";\n } else if (typeof value === \"symbol\") {\n return \"symbol\";\n }\n\n throw new Error(`value of unknown type: ${value}`);\n}\n\nexport const isPrimitive = (value: unknown): boolean => Object(value) !== value;\n","// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nfunction cssParse(css, options) {\n options = options || {};\n\n /**\n * Positional.\n */\n\n let lineno = 1;\n let column = 1;\n\n /**\n * Update lineno and column based on `str`.\n */\n\n function updatePosition(str) {\n let lines = str.match(/\\n/g);\n if (lines) lineno += lines.length;\n let i = str.lastIndexOf(\"\\n\");\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n */\n\n function position() {\n let start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node\n */\n\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string\n */\n\n Position.prototype.content = css;\n\n /**\n * Error `msg`.\n */\n\n let errorsList = [];\n\n function error(msg) {\n let err = new Error(\n options.source + \":\" + lineno + \":\" + column + \": \" + msg,\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = css;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Parse stylesheet.\n */\n\n function stylesheet() {\n let rulesList = rules();\n\n return {\n type: \"stylesheet\",\n stylesheet: {\n source: options.source,\n rules: rulesList,\n parsingErrors: errorsList,\n },\n };\n }\n\n /**\n * Opening brace.\n */\n\n function open() {\n return match(/^{\\s*/);\n }\n\n /**\n * Closing brace.\n */\n\n function close() {\n return match(/^}/);\n }\n\n /**\n * Parse ruleset.\n */\n\n function rules() {\n let node;\n let rules = [];\n whitespace();\n comments(rules);\n while (css.length && css.charAt(0) != \"}\" && (node = atrule() || rule())) {\n if (node !== false) {\n rules.push(node);\n comments(rules);\n }\n }\n return rules;\n }\n\n /**\n * Match `re` and return captures.\n */\n\n function match(re) {\n let m = re.exec(css);\n if (!m) return;\n let str = m[0];\n updatePosition(str);\n css = css.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n\n function whitespace() {\n match(/^\\s*/);\n }\n\n /**\n * Parse comments;\n */\n\n function comments(rules) {\n let c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n */\n\n function comment() {\n let pos = position();\n if (\"/\" != css.charAt(0) || \"*\" != css.charAt(1)) return;\n\n let i = 2;\n while (\n \"\" != css.charAt(i) &&\n (\"*\" != css.charAt(i) || \"/\" != css.charAt(i + 1))\n )\n ++i;\n i += 2;\n\n if (\"\" === css.charAt(i - 1)) {\n return error(\"End of comment missing\");\n }\n\n let str = css.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n css = css.slice(i);\n column += 2;\n\n return pos({\n type: \"comment\",\n comment: str,\n });\n }\n\n /**\n * Parse selector.\n */\n\n function selector() {\n let m = match(/^([^{]+)/);\n if (!m) return;\n /* @fix Remove all comments from selectors\n * http://ostermiller.org/findcomment.html */\n return trim(m[0])\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, \"\")\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function (m) {\n return m.replace(/,/g, \"\\u200C\");\n })\n .split(/\\s*(?![^(]*\\)),\\s*/)\n .map(function (s) {\n return s.replace(/\\u200C/g, \",\");\n });\n }\n\n /**\n * Parse declaration.\n */\n\n function declaration() {\n let pos = position();\n\n // prop\n // eslint-disable-next-line no-useless-escape\n let prop = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\n if (!prop) return;\n prop = trim(prop[0]);\n\n // :\n if (!match(/^:\\s*/)) return error(\"property missing ':'\");\n\n // val\n // eslint-disable-next-line no-useless-escape\n let val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\n\n let ret = pos({\n type: \"declaration\",\n property: prop.replace(commentre, \"\"),\n value: val ? trim(val[0]).replace(commentre, \"\") : \"\",\n });\n\n // ;\n match(/^[;\\s]*/);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n */\n\n function declarations() {\n let decls = [];\n\n if (!open()) return error(\"missing '{'\");\n comments(decls);\n\n // declarations\n let decl;\n while ((decl = declaration())) {\n if (decl !== false) {\n decls.push(decl);\n comments(decls);\n }\n }\n\n if (!close()) return error(\"missing '}'\");\n return decls;\n }\n\n /**\n * Parse keyframe.\n */\n\n function keyframe() {\n let m;\n let vals = [];\n let pos = position();\n\n while ((m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/))) {\n vals.push(m[1]);\n match(/^,\\s*/);\n }\n\n if (!vals.length) return;\n\n return pos({\n type: \"keyframe\",\n values: vals,\n declarations: declarations(),\n });\n }\n\n /**\n * Parse keyframes.\n */\n\n function atkeyframes() {\n let pos = position();\n let m = match(/^@([-\\w]+)?keyframes\\s*/);\n\n if (!m) return;\n let vendor = m[1];\n\n // identifier\n m = match(/^([-\\w]+)\\s*/);\n if (!m) return error(\"@keyframes missing name\");\n let name = m[1];\n\n if (!open()) return error(\"@keyframes missing '{'\");\n\n let frame;\n let frames = comments();\n while ((frame = keyframe())) {\n frames.push(frame);\n frames = frames.concat(comments());\n }\n\n if (!close()) return error(\"@keyframes missing '}'\");\n\n return pos({\n type: \"keyframes\",\n name: name,\n vendor: vendor,\n keyframes: frames,\n });\n }\n\n /**\n * Parse supports.\n */\n\n function atsupports() {\n let pos = position();\n let m = match(/^@supports *([^{]+)/);\n\n if (!m) return;\n let supports = trim(m[1]);\n\n if (!open()) return error(\"@supports missing '{'\");\n\n let style = comments().concat(rules());\n\n if (!close()) return error(\"@supports missing '}'\");\n\n return pos({\n type: \"supports\",\n supports: supports,\n rules: style,\n });\n }\n\n /**\n * Parse host.\n */\n\n function athost() {\n let pos = position();\n let m = match(/^@host\\s*/);\n\n if (!m) return;\n\n if (!open()) return error(\"@host missing '{'\");\n\n let style = comments().concat(rules());\n\n if (!close()) return error(\"@host missing '}'\");\n\n return pos({\n type: \"host\",\n rules: style,\n });\n }\n\n /**\n * Parse media.\n */\n\n function atmedia() {\n let pos = position();\n let m = match(/^@media *([^{]+)/);\n\n if (!m) return;\n let media = trim(m[1]);\n\n if (!open()) return error(\"@media missing '{'\");\n\n let style = comments().concat(rules());\n\n if (!close()) return error(\"@media missing '}'\");\n\n return pos({\n type: \"media\",\n media: media,\n rules: style,\n });\n }\n\n /**\n * Parse custom-media.\n */\n\n function atcustommedia() {\n let pos = position();\n let m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\n if (!m) return;\n\n return pos({\n type: \"custom-media\",\n name: trim(m[1]),\n media: trim(m[2]),\n });\n }\n\n /**\n * Parse paged media.\n */\n\n function atpage() {\n let pos = position();\n let m = match(/^@page */);\n if (!m) return;\n\n let sel = selector() || [];\n\n if (!open()) return error(\"@page missing '{'\");\n let decls = comments();\n\n // declarations\n let decl;\n while ((decl = declaration())) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@page missing '}'\");\n\n return pos({\n type: \"page\",\n selectors: sel,\n declarations: decls,\n });\n }\n\n /**\n * Parse document.\n */\n\n function atdocument() {\n let pos = position();\n let m = match(/^@([-\\w]+)?document *([^{]+)/);\n if (!m) return;\n\n let vendor = trim(m[1]);\n let doc = trim(m[2]);\n\n if (!open()) return error(\"@document missing '{'\");\n\n let style = comments().concat(rules());\n\n if (!close()) return error(\"@document missing '}'\");\n\n return pos({\n type: \"document\",\n document: doc,\n vendor: vendor,\n rules: style,\n });\n }\n\n /**\n * Parse font-face.\n */\n\n function atfontface() {\n let pos = position();\n let m = match(/^@font-face\\s*/);\n if (!m) return;\n\n if (!open()) return error(\"@font-face missing '{'\");\n let decls = comments();\n\n // declarations\n let decl;\n while ((decl = declaration())) {\n decls.push(decl);\n decls = decls.concat(comments());\n }\n\n if (!close()) return error(\"@font-face missing '}'\");\n\n return pos({\n type: \"font-face\",\n declarations: decls,\n });\n }\n\n /**\n * Parse import\n */\n\n let atimport = _compileAtrule(\"import\");\n\n /**\n * Parse charset\n */\n\n let atcharset = _compileAtrule(\"charset\");\n\n /**\n * Parse namespace\n */\n\n let atnamespace = _compileAtrule(\"namespace\");\n\n /**\n * Parse non-block at-rules\n */\n\n function _compileAtrule(name) {\n let re = new RegExp(\"^@\" + name + \"\\\\s*([^;]+);\");\n return function () {\n let pos = position();\n let m = match(re);\n if (!m) return;\n let ret = { type: name };\n ret[name] = m[1].trim();\n return pos(ret);\n };\n }\n\n /**\n * Parse at rule.\n */\n\n function atrule() {\n if (css[0] != \"@\") return;\n\n return (\n atkeyframes() ||\n atmedia() ||\n atcustommedia() ||\n atsupports() ||\n atimport() ||\n atcharset() ||\n atnamespace() ||\n atdocument() ||\n atpage() ||\n athost() ||\n atfontface()\n );\n }\n\n /**\n * Parse rule.\n */\n\n function rule() {\n let pos = position();\n let sel = selector();\n\n if (!sel) return error(\"selector missing\");\n comments();\n\n return pos({\n type: \"rule\",\n selectors: sel,\n declarations: declarations(),\n });\n }\n\n return addParent(stylesheet());\n}\n\n/**\n * Trim `str`.\n */\n\nfunction trim(str) {\n return str ? str.replace(/^\\s+|\\s+$/g, \"\") : \"\";\n}\n\n/**\n * Adds non-enumerable parent node reference to each node.\n */\n\nfunction addParent(obj, parent) {\n let isNode = obj && typeof obj.type === \"string\";\n let childParent = isNode ? obj : parent;\n\n for (var k in obj) {\n let value = obj[k];\n if (Array.isArray(value)) {\n value.forEach(function (v) {\n addParent(v, childParent);\n });\n } else if (value && typeof value === \"object\") {\n addParent(value, childParent);\n }\n }\n\n if (isNode) {\n Object.defineProperty(obj, \"parent\", {\n configurable: true,\n writable: true,\n enumerable: false,\n value: parent || null,\n });\n }\n\n return obj;\n}\n\nexport default cssParse;\n","import { checkHtmlElement, deprecate } from \"./utils\";\n\nexport function toBeInTheDOM(element, container) {\n deprecate(\n \"toBeInTheDOM\",\n \"Please use toBeInTheDocument for searching the entire document and toContainElement for searching a specific container.\",\n );\n\n if (element) {\n checkHtmlElement(element, toBeInTheDOM, this);\n }\n\n if (container) {\n checkHtmlElement(container, toBeInTheDOM, this);\n }\n\n return {\n pass: container ? container.contains(element) : !!element,\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeInTheDOM`,\n \"element\",\n \"\",\n ),\n \"\",\n \"Received:\",\n ` ${this.utils.printReceived(\n element ? element.cloneNode(false) : element,\n )}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement } from \"./utils\";\n\nexport function toBeInTheDocument(element) {\n if (element !== null || !this.isNot) {\n checkHtmlElement(element, toBeInTheDocument, this);\n }\n\n const pass =\n element === null\n ? false\n : element.ownerDocument === element.getRootNode({ composed: true });\n\n const errorFound = () => {\n return `expected document not to contain element, found ${this.utils.stringify(\n element.cloneNode(true),\n )} instead`;\n };\n const errorNotFound = () => {\n return `element could not be found in the document`;\n };\n\n return {\n pass,\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeInTheDocument`,\n \"element\",\n \"\",\n ),\n \"\",\n this.utils.RECEIVED_COLOR(this.isNot ? errorFound() : errorNotFound()),\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement, deprecate } from \"./utils\";\n\nexport function toBeEmpty(element) {\n deprecate(\n \"toBeEmpty\",\n \"Please use instead toBeEmptyDOMElement for finding empty nodes in the DOM.\",\n );\n checkHtmlElement(element, toBeEmpty, this);\n\n return {\n pass: element.innerHTML === \"\",\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeEmpty`,\n \"element\",\n \"\",\n ),\n \"\",\n \"Received:\",\n ` ${this.utils.printReceived(element.innerHTML)}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement } from \"./utils\";\n\nexport function toBeEmptyDOMElement(element) {\n checkHtmlElement(element, toBeEmptyDOMElement, this);\n\n return {\n pass: isEmptyElement(element),\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeEmptyDOMElement`,\n \"element\",\n \"\",\n ),\n \"\",\n \"Received:\",\n ` ${this.utils.printReceived(element.innerHTML)}`,\n ].join(\"\\n\");\n },\n };\n}\n\n/**\n * Identifies if an element doesn't contain child nodes (excluding comments)\n * ℹ Node.COMMENT_NODE can't be used because of the following issue\n * https://github.com/jsdom/jsdom/issues/2220\n *\n * @param {*} element an HtmlElement or SVGElement\n * @return {*} true if the element only contains comments or none\n */\nfunction isEmptyElement(element) {\n const nonCommentChildNodes = [...element.childNodes].filter(\n (node) => node.nodeType !== 8,\n );\n return nonCommentChildNodes.length === 0;\n}\n","import { checkHtmlElement } from \"./utils\";\n\nexport function toContainElement(container, element) {\n checkHtmlElement(container, toContainElement, this);\n\n if (element !== null) {\n checkHtmlElement(element, toContainElement, this);\n }\n\n return {\n pass: container.contains(element),\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toContainElement`,\n \"element\",\n \"element\",\n ),\n \"\",\n this.utils.RECEIVED_COLOR(`${this.utils.stringify(\n container.cloneNode(false),\n )} ${\n this.isNot ? \"contains:\" : \"does not contain:\"\n } ${this.utils.stringify(element ? element.cloneNode(false) : element)}\n `),\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement } from \"./utils\";\n\nfunction getNormalizedHtml(container, htmlText) {\n const div = container.ownerDocument.createElement(\"div\");\n div.innerHTML = htmlText;\n return div.innerHTML;\n}\n\nexport function toContainHTML(container, htmlText) {\n checkHtmlElement(container, toContainHTML, this);\n\n if (typeof htmlText !== \"string\") {\n throw new Error(`.toContainHTML() expects a string value, got ${htmlText}`);\n }\n\n return {\n pass: container.outerHTML.includes(getNormalizedHtml(container, htmlText)),\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toContainHTML`,\n \"element\",\n \"\",\n ),\n \"Expected:\",\n ` ${this.utils.EXPECTED_COLOR(htmlText)}`,\n \"Received:\",\n ` ${this.utils.printReceived(container.cloneNode(true))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { getMessage, checkNode, matches, normalize } from \"./utils\";\n\nexport function toHaveTextContent(\n node,\n checkWith,\n options = { normalizeWhitespace: true },\n) {\n checkNode(node, toHaveTextContent, this);\n\n const textContent = options.normalizeWhitespace\n ? normalize(node.textContent)\n : node.textContent.replace(/\\u00a0/g, \" \"); // Replace with normal spaces\n\n const checkingWithEmptyString = textContent !== \"\" && checkWith === \"\";\n\n return {\n pass: !checkingWithEmptyString && matches(textContent, checkWith),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveTextContent`,\n \"element\",\n \"\",\n ),\n checkingWithEmptyString\n ? `Checking with empty string will always match, use .toBeEmptyDOMElement() instead`\n : `Expected element ${to} have text content`,\n checkWith,\n \"Received\",\n textContent,\n );\n },\n };\n}\n","import { computeAccessibleDescription } from \"dom-accessibility-api\";\nimport { checkHtmlElement, getMessage } from \"./utils\";\n\nexport function toHaveAccessibleDescription(\n htmlElement,\n expectedAccessibleDescription,\n) {\n checkHtmlElement(htmlElement, toHaveAccessibleDescription, this);\n const actualAccessibleDescription = computeAccessibleDescription(htmlElement);\n const missingExpectedValue = arguments.length === 1;\n\n let pass = false;\n if (missingExpectedValue) {\n // When called without an expected value we only want to validate that the element has an\n // accessible description, whatever it may be.\n pass = actualAccessibleDescription !== \"\";\n } else {\n pass =\n expectedAccessibleDescription instanceof RegExp\n ? expectedAccessibleDescription.test(actualAccessibleDescription)\n : this.equals(\n actualAccessibleDescription,\n expectedAccessibleDescription,\n );\n }\n\n return {\n pass,\n\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.${toHaveAccessibleDescription.name}`,\n \"element\",\n \"\",\n ),\n `Expected element ${to} have accessible description`,\n expectedAccessibleDescription,\n \"Received\",\n actualAccessibleDescription,\n );\n },\n };\n}\n","import { computeAccessibleName } from \"dom-accessibility-api\";\nimport { checkHtmlElement, getMessage } from \"./utils\";\n\nexport function toHaveAccessibleName(htmlElement, expectedAccessibleName) {\n checkHtmlElement(htmlElement, toHaveAccessibleName, this);\n const actualAccessibleName = computeAccessibleName(htmlElement);\n const missingExpectedValue = arguments.length === 1;\n\n let pass = false;\n if (missingExpectedValue) {\n // When called without an expected value we only want to validate that the element has an\n // accessible name, whatever it may be.\n pass = actualAccessibleName !== \"\";\n } else {\n pass =\n expectedAccessibleName instanceof RegExp\n ? expectedAccessibleName.test(actualAccessibleName)\n : this.equals(actualAccessibleName, expectedAccessibleName);\n }\n\n return {\n pass,\n\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.${toHaveAccessibleName.name}`,\n \"element\",\n \"\",\n ),\n `Expected element ${to} have accessible name`,\n expectedAccessibleName,\n \"Received\",\n actualAccessibleName,\n );\n },\n };\n}\n","import { checkHtmlElement, getMessage } from \"./utils\";\n\nfunction printAttribute(stringify, name, value) {\n return value === undefined ? name : `${name}=${stringify(value)}`;\n}\n\nfunction getAttributeComment(stringify, name, value) {\n return value === undefined\n ? `element.hasAttribute(${stringify(name)})`\n : `element.getAttribute(${stringify(name)}) === ${stringify(value)}`;\n}\n\nexport function toHaveAttribute(htmlElement, name, expectedValue) {\n checkHtmlElement(htmlElement, toHaveAttribute, this);\n const isExpectedValuePresent = expectedValue !== undefined;\n const hasAttribute = htmlElement.hasAttribute(name);\n const receivedValue = htmlElement.getAttribute(name);\n return {\n pass: isExpectedValuePresent\n ? hasAttribute && this.equals(receivedValue, expectedValue)\n : hasAttribute,\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n const receivedAttribute = hasAttribute\n ? printAttribute(this.utils.stringify, name, receivedValue)\n : null;\n const matcher = this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveAttribute`,\n \"element\",\n this.utils.printExpected(name),\n {\n secondArgument: isExpectedValuePresent\n ? this.utils.printExpected(expectedValue)\n : undefined,\n comment: getAttributeComment(\n this.utils.stringify,\n name,\n expectedValue,\n ),\n },\n );\n return getMessage(\n this,\n matcher,\n `Expected the element ${to} have attribute`,\n printAttribute(this.utils.stringify, name, expectedValue),\n \"Received\",\n receivedAttribute,\n );\n },\n };\n}\n","import { checkHtmlElement, getMessage } from \"./utils\";\n\nfunction getExpectedClassNamesAndOptions(params) {\n const lastParam = params.pop();\n let expectedClassNames, options;\n\n if (typeof lastParam === \"object\") {\n expectedClassNames = params;\n options = lastParam;\n } else {\n expectedClassNames = params.concat(lastParam);\n options = { exact: false };\n }\n return { expectedClassNames, options };\n}\n\nfunction splitClassNames(str) {\n if (!str) {\n return [];\n }\n return str.split(/\\s+/).filter((s) => s.length > 0);\n}\n\nfunction isSubset(subset, superset) {\n return subset.every((item) => superset.includes(item));\n}\n\nexport function toHaveClass(htmlElement, ...params) {\n checkHtmlElement(htmlElement, toHaveClass, this);\n const { expectedClassNames, options } =\n getExpectedClassNamesAndOptions(params);\n\n const received = splitClassNames(htmlElement.getAttribute(\"class\"));\n const expected = expectedClassNames.reduce(\n (acc, className) => acc.concat(splitClassNames(className)),\n [],\n );\n\n if (options.exact) {\n return {\n pass: isSubset(expected, received) && expected.length === received.length,\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveClass`,\n \"element\",\n this.utils.printExpected(expected.join(\" \")),\n ),\n `Expected the element ${to} have EXACTLY defined classes`,\n expected.join(\" \"),\n \"Received\",\n received.join(\" \"),\n );\n },\n };\n }\n\n return expected.length > 0\n ? {\n pass: isSubset(expected, received),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveClass`,\n \"element\",\n this.utils.printExpected(expected.join(\" \")),\n ),\n `Expected the element ${to} have class`,\n expected.join(\" \"),\n \"Received\",\n received.join(\" \"),\n );\n },\n }\n : {\n pass: this.isNot ? received.length > 0 : false,\n message: () =>\n this.isNot\n ? getMessage(\n this,\n this.utils.matcherHint(\".not.toHaveClass\", \"element\", \"\"),\n \"Expected the element to have classes\",\n \"(none)\",\n \"Received\",\n received.join(\" \"),\n )\n : [\n this.utils.matcherHint(`.toHaveClass`, \"element\"),\n \"At least one expected class must be provided.\",\n ].join(\"\\n\"),\n };\n}\n","import chalk from \"chalk\";\nimport { checkHtmlElement, parseCSS } from \"./utils\";\n\nfunction getStyleDeclaration(document, css) {\n const styles = {};\n\n // The next block is necessary to normalize colors\n const copy = document.createElement(\"div\");\n Object.keys(css).forEach((property) => {\n copy.style[property] = css[property];\n styles[property] = copy.style[property];\n });\n\n return styles;\n}\n\nfunction isSubset(styles, computedStyle) {\n return (\n !!Object.keys(styles).length &&\n Object.entries(styles).every(\n ([prop, value]) =>\n computedStyle[prop] === value ||\n computedStyle.getPropertyValue(prop.toLowerCase()) === value,\n )\n );\n}\n\nfunction printoutStyles(styles) {\n return Object.keys(styles)\n .sort()\n .map((prop) => `${prop}: ${styles[prop]};`)\n .join(\"\\n\");\n}\n\n// Highlights only style rules that were expected but were not found in the\n// received computed styles\nfunction expectedDiff(diffFn, expected, computedStyles) {\n const received = Array.from(computedStyles)\n .filter((prop) => expected[prop] !== undefined)\n .reduce(\n (obj, prop) =>\n Object.assign(obj, { [prop]: computedStyles.getPropertyValue(prop) }),\n {},\n );\n const diffOutput = diffFn(printoutStyles(expected), printoutStyles(received));\n // Remove the \"+ Received\" annotation because this is a one-way diff\n return diffOutput.replace(`${chalk.red(\"+ Received\")}\\n`, \"\");\n}\n\nexport function toHaveStyle(htmlElement, css) {\n checkHtmlElement(htmlElement, toHaveStyle, this);\n const parsedCSS =\n typeof css === \"object\" ? css : parseCSS(css, toHaveStyle, this);\n const { getComputedStyle } = htmlElement.ownerDocument.defaultView;\n\n const expected = getStyleDeclaration(htmlElement.ownerDocument, parsedCSS);\n const received = getComputedStyle(htmlElement);\n\n return {\n pass: isSubset(expected, received),\n message: () => {\n const matcher = `${this.isNot ? \".not\" : \"\"}.toHaveStyle`;\n return [\n this.utils.matcherHint(matcher, \"element\", \"\"),\n expectedDiff(this.utils.diff, expected, received),\n ].join(\"\\n\\n\");\n },\n };\n}\n","import { checkHtmlElement } from \"./utils\";\n\nexport function toHaveFocus(element) {\n checkHtmlElement(element, toHaveFocus, this);\n\n return {\n pass: element.ownerDocument.activeElement === element,\n message: () => {\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveFocus`,\n \"element\",\n \"\",\n ),\n \"\",\n ...(this.isNot\n ? [\n \"Received element is focused:\",\n ` ${this.utils.printReceived(element)}`,\n ]\n : [\n \"Expected element with focus:\",\n ` ${this.utils.printExpected(element)}`,\n \"Received element with focus:\",\n ` ${this.utils.printReceived(\n element.ownerDocument.activeElement,\n )}`,\n ]),\n ].join(\"\\n\");\n },\n };\n}\n","import {\n checkHtmlElement,\n compareArraysAsSet,\n getSingleElementValue,\n} from \"./utils\";\nimport escape from \"css.escape\";\nimport { isEqualWith, uniq } from \"lodash-es\";\nimport type { MatcherResult } from \"./types\";\n\n// Returns the combined value of several elements that have the same name\n// e.g. radio buttons or groups of checkboxes\nfunction getMultiElementValue(\n elements: (HTMLInputElement & { type: \"radio\" })[],\n): string | undefined;\nfunction getMultiElementValue(\n elements: (HTMLInputElement & { type: \"checkbox\" })[],\n): string[];\nfunction getMultiElementValue(elements: HTMLInputElement[]): string[];\n\nfunction getMultiElementValue(elements: HTMLInputElement[]) {\n const types = uniq(elements.map((element) => element.type));\n if (types.length !== 1) {\n throw new Error(\n \"Multiple form elements with the same name must be of the same type\",\n );\n }\n switch (types[0]) {\n case \"radio\": {\n const theChosenOne = elements.find((radio) => radio.checked);\n return theChosenOne ? theChosenOne.value : undefined;\n }\n case \"checkbox\":\n return elements\n .filter((checkbox) => checkbox.checked)\n .map((checkbox) => checkbox.value);\n default:\n // NOTE: Not even sure this is a valid use case, but just in case...\n return elements.map((element) => element.value);\n }\n}\n\ntype FormElement =\n | HTMLInputElement\n | HTMLSelectElement\n | HTMLTextAreaElement\n | HTMLButtonElement\n | HTMLMeterElement\n | HTMLProgressElement;\n\nfunction getFormValue(\n container: HTMLFormElement | HTMLFieldSetElement,\n name: string,\n) {\n container.elements;\n const elements = [\n ...container.querySelectorAll(`[name=\"${escape(name)}\"]`),\n ] as FormElement[];\n if (elements.length === 0) {\n return undefined; // shouldn't happen, but just in case\n }\n switch (elements.length) {\n case 1:\n return getSingleElementValue(elements[0]);\n default:\n return getMultiElementValue(elements as HTMLInputElement[]);\n }\n}\n\n// Strips the `[]` suffix off a form value name\nfunction getPureName(name: string) {\n return /\\[\\]$/.test(name) ? name.slice(0, -2) : name;\n}\n\nfunction getAllFormValues(container: HTMLFormElement | HTMLFieldSetElement) {\n const names = Array.from(container.elements).map(\n (element) => (element as HTMLInputElement).name,\n );\n return names.reduce<Record<string, unknown>>(\n (obj, name) => ({\n ...obj,\n [getPureName(name)]: getFormValue(container, name),\n }),\n {},\n );\n}\n\nexport function toHaveFormValues(\n this: any,\n formElement: HTMLFormElement | HTMLFieldSetElement,\n expectedValues: Record<string, unknown>,\n): MatcherResult {\n checkHtmlElement(formElement, toHaveFormValues, this);\n if (!formElement.elements) {\n // TODO: Change condition to use instanceof against the appropriate element classes instead\n throw new Error(\"toHaveFormValues must be called on a form or a fieldset\");\n }\n const formValues = getAllFormValues(formElement);\n return {\n pass: Object.entries(expectedValues).every(([name, expectedValue]) =>\n isEqualWith(formValues[name], expectedValue, compareArraysAsSet),\n ),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n const matcher = `${this.isNot ? \".not\" : \"\"}.toHaveFormValues`;\n const commonKeyValues = Object.keys(formValues)\n .filter((key) => expectedValues.hasOwnProperty(key))\n .reduce((obj, key) => ({ ...obj, [key]: formValues[key] }), {});\n return [\n this.utils.matcherHint(matcher, \"element\", \"\"),\n `Expected the element ${to} have form values`,\n this.utils.diff(expectedValues, commonKeyValues),\n ].join(\"\\n\\n\");\n },\n };\n}\n","import { checkHtmlElement } from \"./utils\";\n\nfunction isStyleVisible(element) {\n const { getComputedStyle } = element.ownerDocument.defaultView;\n\n const { display, visibility, opacity } = getComputedStyle(element);\n return (\n display !== \"none\" &&\n visibility !== \"hidden\" &&\n visibility !== \"collapse\" &&\n opacity !== \"0\" &&\n opacity !== 0\n );\n}\n\nfunction isAttributeVisible(element, previousElement) {\n let detailsVisibility;\n\n if (previousElement) {\n detailsVisibility =\n element.nodeName === \"DETAILS\" && previousElement.nodeName !== \"SUMMARY\"\n ? element.hasAttribute(\"open\")\n : true;\n } else {\n detailsVisibility =\n element.nodeName === \"DETAILS\" ? element.hasAttribute(\"open\") : true;\n }\n\n return !element.hasAttribute(\"hidden\") && detailsVisibility;\n}\n\nfunction isElementVisible(element, previousElement) {\n return (\n isStyleVisible(element) &&\n isAttributeVisible(element, previousElement) &&\n (!element.parentElement || isElementVisible(element.parentElement, element))\n );\n}\n\nexport function toBeVisible(element) {\n checkHtmlElement(element, toBeVisible, this);\n const isInDocument =\n element.ownerDocument === element.getRootNode({ composed: true });\n const isVisible = isInDocument && isElementVisible(element);\n return {\n pass: isVisible,\n message: () => {\n const is = isVisible ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeVisible`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} visible${\n isInDocument ? \"\" : \" (element is not in the document)\"\n }:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement, getTag } from \"./utils\";\n\n// form elements that support 'disabled'\nconst FORM_TAGS = [\n \"fieldset\",\n \"input\",\n \"select\",\n \"optgroup\",\n \"option\",\n \"button\",\n \"textarea\",\n];\n\n/*\n * According to specification:\n * If <fieldset> is disabled, the form controls that are its descendants,\n * except descendants of its first optional <legend> element, are disabled\n *\n * https://html.spec.whatwg.org/multipage/form-elements.html#concept-fieldset-disabled\n *\n * This method tests whether element is first legend child of fieldset parent\n */\nfunction isFirstLegendChildOfFieldset(element, parent) {\n return (\n getTag(element) === \"legend\" &&\n getTag(parent) === \"fieldset\" &&\n element.isSameNode(\n Array.from(parent.children).find((child) => getTag(child) === \"legend\"),\n )\n );\n}\n\nfunction isElementDisabledByParent(element, parent) {\n return (\n isElementDisabled(parent) && !isFirstLegendChildOfFieldset(element, parent)\n );\n}\n\nfunction isCustomElement(tag) {\n return tag.includes(\"-\");\n}\n\n/*\n * Only certain form elements and custom elements can actually be disabled:\n * https://html.spec.whatwg.org/multipage/semantics-other.html#disabled-elements\n */\nfunction canElementBeDisabled(element) {\n const tag = getTag(element);\n return FORM_TAGS.includes(tag) || isCustomElement(tag);\n}\n\nfunction isElementDisabled(element) {\n return canElementBeDisabled(element) && element.hasAttribute(\"disabled\");\n}\n\nfunction isAncestorDisabled(element) {\n const parent = element.parentElement;\n return (\n Boolean(parent) &&\n (isElementDisabledByParent(element, parent) || isAncestorDisabled(parent))\n );\n}\n\nfunction isElementOrAncestorDisabled(element) {\n return (\n canElementBeDisabled(element) &&\n (isElementDisabled(element) || isAncestorDisabled(element))\n );\n}\n\nexport function toBeDisabled(element) {\n checkHtmlElement(element, toBeDisabled, this);\n\n const isDisabled = isElementOrAncestorDisabled(element);\n\n return {\n pass: isDisabled,\n message: () => {\n const is = isDisabled ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeDisabled`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} disabled:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n\nexport function toBeEnabled(element) {\n checkHtmlElement(element, toBeEnabled, this);\n\n const isEnabled = !isElementOrAncestorDisabled(element);\n\n return {\n pass: isEnabled,\n message: () => {\n const is = isEnabled ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeEnabled`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} enabled:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement, getTag } from \"./utils\";\n\n// form elements that support 'required'\nconst FORM_TAGS = [\"select\", \"textarea\"];\n\nconst ARIA_FORM_TAGS = [\"input\", \"select\", \"textarea\"];\n\nconst UNSUPPORTED_INPUT_TYPES = [\n \"color\",\n \"hidden\",\n \"range\",\n \"submit\",\n \"image\",\n \"reset\",\n];\n\nconst SUPPORTED_ARIA_ROLES = [\n \"combobox\",\n \"gridcell\",\n \"radiogroup\",\n \"spinbutton\",\n \"tree\",\n];\n\nfunction isRequiredOnFormTagsExceptInput(element) {\n return (\n FORM_TAGS.includes(getTag(element)) && element.hasAttribute(\"required\")\n );\n}\n\nfunction isRequiredOnSupportedInput(element) {\n return (\n getTag(element) === \"input\" &&\n element.hasAttribute(\"required\") &&\n ((element.hasAttribute(\"type\") &&\n !UNSUPPORTED_INPUT_TYPES.includes(element.getAttribute(\"type\"))) ||\n !element.hasAttribute(\"type\"))\n );\n}\n\nfunction isElementRequiredByARIA(element) {\n return (\n element.hasAttribute(\"aria-required\") &&\n element.getAttribute(\"aria-required\") === \"true\" &&\n (ARIA_FORM_TAGS.includes(getTag(element)) ||\n (element.hasAttribute(\"role\") &&\n SUPPORTED_ARIA_ROLES.includes(element.getAttribute(\"role\"))))\n );\n}\n\nexport function toBeRequired(element) {\n checkHtmlElement(element, toBeRequired, this);\n\n const isRequired =\n isRequiredOnFormTagsExceptInput(element) ||\n isRequiredOnSupportedInput(element) ||\n isElementRequiredByARIA(element);\n\n return {\n pass: isRequired,\n message: () => {\n const is = isRequired ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeRequired`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} required:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement, getTag } from \"./utils\";\n\nconst FORM_TAGS = [\"form\", \"input\", \"select\", \"textarea\"];\n\nfunction isElementHavingAriaInvalid(element) {\n return (\n element.hasAttribute(\"aria-invalid\") &&\n element.getAttribute(\"aria-invalid\") !== \"false\"\n );\n}\n\nfunction isSupportsValidityMethod(element) {\n return FORM_TAGS.includes(getTag(element));\n}\n\nfunction isElementInvalid(element) {\n const isHaveAriaInvalid = isElementHavingAriaInvalid(element);\n if (isSupportsValidityMethod(element)) {\n return isHaveAriaInvalid || !element.checkValidity();\n } else {\n return isHaveAriaInvalid;\n }\n}\n\nexport function toBeInvalid(element) {\n checkHtmlElement(element, toBeInvalid, this);\n\n const isInvalid = isElementInvalid(element);\n\n return {\n pass: isInvalid,\n message: () => {\n const is = isInvalid ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeInvalid`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} currently invalid:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n\nexport function toBeValid(element) {\n checkHtmlElement(element, toBeValid, this);\n\n const isValid = !isElementInvalid(element);\n\n return {\n pass: isValid,\n message: () => {\n const is = isValid ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeValid`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} currently valid:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import {\n checkHtmlElement,\n compareArraysAsSet,\n getMessage,\n getSingleElementValue,\n} from \"./utils\";\nimport { isEqualWith } from \"lodash-es\";\n\nexport function toHaveValue(htmlElement, expectedValue) {\n checkHtmlElement(htmlElement, toHaveValue, this);\n\n if (\n htmlElement.tagName.toLowerCase() === \"input\" &&\n [\"checkbox\", \"radio\"].includes(htmlElement.type)\n ) {\n throw new Error(\n \"input with type=checkbox or type=radio cannot be used with .toHaveValue(). Use .toBeChecked() for type=checkbox or .toHaveFormValues() instead\",\n );\n }\n\n const receivedValue = getSingleElementValue(htmlElement);\n const expectsValue = expectedValue !== undefined;\n\n let expectedTypedValue = expectedValue;\n let receivedTypedValue = receivedValue;\n if (expectedValue == receivedValue && expectedValue !== receivedValue) {\n expectedTypedValue = `${expectedValue} (${typeof expectedValue})`;\n receivedTypedValue = `${receivedValue} (${typeof receivedValue})`;\n }\n\n return {\n pass: expectsValue\n ? isEqualWith(receivedValue, expectedValue, compareArraysAsSet)\n : Boolean(receivedValue),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n const matcher = this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveValue`,\n \"element\",\n expectedValue,\n );\n return getMessage(\n this,\n matcher,\n `Expected the element ${to} have value`,\n expectsValue ? expectedTypedValue : \"(any)\",\n \"Received\",\n receivedTypedValue,\n );\n },\n };\n}\n","import { checkHtmlElement, getMessage } from \"./utils\";\n\nexport function toHaveDisplayValue(htmlElement, expectedValue) {\n checkHtmlElement(htmlElement, toHaveDisplayValue, this);\n const tagName = htmlElement.tagName.toLowerCase();\n\n if (![\"select\", \"input\", \"textarea\"].includes(tagName)) {\n throw new Error(\n \".toHaveDisplayValue() currently supports only input, textarea or select elements, try with another matcher instead.\",\n );\n }\n\n if (tagName === \"input\" && [\"radio\", \"checkbox\"].includes(htmlElement.type)) {\n throw new Error(\n `.toHaveDisplayValue() currently does not support input[type=\"${htmlElement.type}\"], try with another matcher instead.`,\n );\n }\n\n const values = getValues(tagName, htmlElement);\n const expectedValues = getExpectedValues(expectedValue);\n const numberOfMatchesWithValues = expectedValues.filter((expected) =>\n values.some((value) =>\n expected instanceof RegExp\n ? expected.test(value)\n : this.equals(value, String(expected)),\n ),\n ).length;\n\n const matchedWithAllValues = numberOfMatchesWithValues === values.length;\n const matchedWithAllExpectedValues =\n numberOfMatchesWithValues === expectedValues.length;\n\n return {\n pass: matchedWithAllValues && matchedWithAllExpectedValues,\n message: () =>\n getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveDisplayValue`,\n \"element\",\n \"\",\n ),\n `Expected element ${this.isNot ? \"not \" : \"\"}to have display value`,\n expectedValue,\n \"Received\",\n values,\n ),\n };\n}\n\nfunction getValues(tagName, htmlElement) {\n return tagName === \"select\"\n ? Array.from(htmlElement)\n .filter((option) => option.selected)\n .map((option) => option.textContent)\n : [htmlElement.value];\n}\n\nfunction getExpectedValues(expectedValue) {\n return expectedValue instanceof Array ? expectedValue : [expectedValue];\n}\n","import { checkHtmlElement, toSentence } from \"./utils\";\n// import { roles } from \"aria-query\";\nimport { createRequire } from \"node:module\";\nconst require = createRequire(import.meta.url);\nconst { roles } = require(\"aria-query\");\n\nexport function toBeChecked(element) {\n checkHtmlElement(element, toBeChecked, this);\n\n const isValidInput = () => {\n return (\n element.tagName.toLowerCase() === \"input\" &&\n [\"checkbox\", \"radio\"].includes(element.type)\n );\n };\n\n const isValidAriaElement = () => {\n return (\n roleSupportsChecked(element.getAttribute(\"role\")) &&\n [\"true\", \"false\"].includes(element.getAttribute(\"aria-checked\"))\n );\n };\n\n if (!isValidInput() && !isValidAriaElement()) {\n return {\n pass: false,\n message: () =>\n `only inputs with type=\"checkbox\" or type=\"radio\" or elements with ${supportedRolesSentence()} and a valid aria-checked attribute can be used with .toBeChecked(). Use .toHaveValue() instead`,\n };\n }\n\n const isChecked = () => {\n if (isValidInput()) return element.checked;\n return element.getAttribute(\"aria-checked\") === \"true\";\n };\n\n return {\n pass: isChecked(),\n message: () => {\n const is = isChecked() ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBeChecked`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} checked:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n\nfunction supportedRolesSentence() {\n return toSentence(\n supportedRoles().map((role) => `role=\"${role}\"`),\n { lastWordConnector: \" or \" },\n );\n}\n\nfunction supportedRoles() {\n return roles.keys().filter(roleSupportsChecked);\n}\n\nfunction roleSupportsChecked(role) {\n return roles.get(role)?.props[\"aria-checked\"] !== undefined;\n}\n","import { checkHtmlElement } from \"./utils\";\n\nexport function toBePartiallyChecked(element) {\n checkHtmlElement(element, toBePartiallyChecked, this);\n\n const isValidInput = () => {\n return (\n element.tagName.toLowerCase() === \"input\" && element.type === \"checkbox\"\n );\n };\n\n const isValidAriaElement = () => {\n return element.getAttribute(\"role\") === \"checkbox\";\n };\n\n if (!isValidInput() && !isValidAriaElement()) {\n return {\n pass: false,\n message: () =>\n 'only inputs with type=\"checkbox\" or elements with role=\"checkbox\" and a valid aria-checked attribute can be used with .toBePartiallyChecked(). Use .toHaveValue() instead',\n };\n }\n\n const isPartiallyChecked = () => {\n const isAriaMixed = element.getAttribute(\"aria-checked\") === \"mixed\";\n\n if (isValidInput()) {\n return element.indeterminate || isAriaMixed;\n }\n\n return isAriaMixed;\n };\n\n return {\n pass: isPartiallyChecked(),\n message: () => {\n const is = isPartiallyChecked() ? \"is\" : \"is not\";\n return [\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toBePartiallyChecked`,\n \"element\",\n \"\",\n ),\n \"\",\n `Received element ${is} partially checked:`,\n ` ${this.utils.printReceived(element.cloneNode(false))}`,\n ].join(\"\\n\");\n },\n };\n}\n","import { checkHtmlElement, getMessage, normalize, deprecate } from \"./utils\";\n\n// See algoritm: https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\nexport function toHaveDescription(htmlElement, checkWith) {\n deprecate(\"toHaveDescription\", \"Please use toHaveAccessibleDescription.\");\n\n checkHtmlElement(htmlElement, toHaveDescription, this);\n\n const expectsDescription = checkWith !== undefined;\n\n const descriptionIDRaw = htmlElement.getAttribute(\"aria-describedby\") || \"\";\n const descriptionIDs = descriptionIDRaw.split(/\\s+/).filter(Boolean);\n let description = \"\";\n if (descriptionIDs.length > 0) {\n const document = htmlElement.ownerDocument;\n const descriptionEls = descriptionIDs\n .map((descriptionID) => document.getElementById(descriptionID))\n .filter(Boolean);\n description = normalize(\n descriptionEls.map((el) => el.textContent).join(\" \"),\n );\n }\n\n return {\n pass: expectsDescription\n ? checkWith instanceof RegExp\n ? checkWith.test(description)\n : this.equals(description, checkWith)\n : Boolean(description),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveDescription`,\n \"element\",\n \"\",\n ),\n `Expected the element ${to} have description`,\n this.utils.printExpected(checkWith),\n \"Received\",\n this.utils.printReceived(description),\n );\n },\n };\n}\n","import { checkHtmlElement, getMessage, normalize } from \"./utils\";\n\n// See aria-errormessage spec https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage\nexport function toHaveErrorMessage(htmlElement, checkWith) {\n checkHtmlElement(htmlElement, toHaveErrorMessage, this);\n\n if (\n !htmlElement.hasAttribute(\"aria-invalid\") ||\n htmlElement.getAttribute(\"aria-invalid\") === \"false\"\n ) {\n const not = this.isNot ? \".not\" : \"\";\n\n return {\n pass: false,\n message: () => {\n return getMessage(\n this,\n this.utils.matcherHint(`${not}.toHaveErrorMessage`, \"element\", \"\"),\n `Expected the element to have invalid state indicated by`,\n 'aria-invalid=\"true\"',\n \"Received\",\n htmlElement.hasAttribute(\"aria-invalid\")\n ? `aria-invalid=\"${htmlElement.getAttribute(\"aria-invalid\")}\"`\n : this.utils.printReceived(\"\"),\n );\n },\n };\n }\n\n const expectsErrorMessage = checkWith !== undefined;\n\n const errormessageIDRaw = htmlElement.getAttribute(\"aria-errormessage\") || \"\";\n const errormessageIDs = errormessageIDRaw.split(/\\s+/).filter(Boolean);\n\n let errormessage = \"\";\n if (errormessageIDs.length > 0) {\n const document = htmlElement.ownerDocument;\n\n const errormessageEls = errormessageIDs\n .map((errormessageID) => document.getElementById(errormessageID))\n .filter(Boolean);\n\n errormessage = normalize(\n errormessageEls.map((el) => el.textContent).join(\" \"),\n );\n }\n\n return {\n pass: expectsErrorMessage\n ? checkWith instanceof RegExp\n ? checkWith.test(errormessage)\n : this.equals(errormessage, checkWith)\n : Boolean(errormessage),\n message: () => {\n const to = this.isNot ? \"not to\" : \"to\";\n return getMessage(\n this,\n this.utils.matcherHint(\n `${this.isNot ? \".not\" : \"\"}.toHaveErrorMessage`,\n \"element\",\n \"\",\n ),\n `Expected the element ${to} have error message`,\n this.utils.printExpected(checkWith),\n \"Received\",\n this.utils.printReceived(errormessage),\n );\n },\n };\n}\n","import { toBeInTheDOM } from \"./to-be-in-the-dom\";\nimport { toBeInTheDocument } from \"./to-be-in-the-document\";\nimport { toBeEmpty } from \"./to-be-empty\";\nimport { toBeEmptyDOMElement } from \"./to-be-empty-dom-element\";\nimport { toContainElement } from \"./to-contain-element\";\nimport { toContainHTML } from \"./to-contain-html\";\nimport { toHaveTextContent } from \"./to-have-text-content\";\nimport { toHaveAccessibleDescription } from \"./to-have-accessible-description\";\nimport { toHaveAccessibleName } from \"./to-have-accessible-name\";\nimport { toHaveAttribute } from \"./to-have-attribute\";\nimport { toHaveClass } from \"./to-have-class\";\nimport { toHaveStyle } from \"./to-have-style\";\nimport { toHaveFocus } from \"./to-have-focus\";\nimport { toHaveFormValues } from \"./to-have-form-values\";\nimport { toBeVisible } from \"./to-be-visible\";\nimport { toBeDisabled, toBeEnabled } from \"./to-be-disabled\";\nimport { toBeRequired } from \"./to-be-required\";\nimport { toBeInvalid, toBeValid } from \"./to-be-invalid\";\nimport { toHaveValue } from \"./to-have-value\";\nimport { toHaveDisplayValue } from \"./to-have-display-value\";\nimport { toBeChecked } from \"./to-be-checked\";\nimport { toBePartiallyChecked } from \"./to-be-partially-checked\";\nimport { toHaveDescription } from \"./to-have-description\";\nimport { toHaveErrorMessage } from \"./to-have-errormessage\";\n\nexport {\n toBeInTheDOM,\n toBeInTheDocument,\n toBeEmpty,\n toBeEmptyDOMElement,\n toContainElement,\n toContainHTML,\n toHaveTextContent,\n toHaveAccessibleDescription,\n toHaveAccessibleName,\n toHaveAttribute,\n toHaveClass,\n toHaveStyle,\n toHaveFocus,\n toHaveFormValues,\n toBeVisible,\n toBeDisabled,\n toBeEnabled,\n toBeRequired,\n toBeInvalid,\n toBeValid,\n toHaveValue,\n toHaveDisplayValue,\n toBeChecked,\n toBePartiallyChecked,\n toHaveDescription,\n toHaveErrorMessage,\n};\n\nexport interface TestingLibraryMatchers<E, R> extends Record<string, any> {\n /**\n * @deprecated\n * since v1.9.0\n * @description\n * Assert whether a value is a DOM element, or not. Contrary to what its name\n * implies, this matcher only checks that you passed to it a valid DOM\n * element.\n *\n * It does not have a clear definition of what \"the DOM\" is. Therefore, it\n * does not check whether that element is contained anywhere.\n * @see [testing-library/jest-dom#toBeInTheDom](https://github.com/testing-library/jest-dom#toBeInTheDom)\n */\n toBeInTheDOM(container?: HTMLElement | SVGElement): R;\n /**\n * @description\n * Assert whether an element is present in the document or not.\n * @example\n * <svg data-testid=\"svg-element\"></svg>\n *\n * expect(queryByTestId('svg-element')).toBeInTheDocument()\n * expect(queryByTestId('does-not-exist')).not.toBeInTheDocument()\n * @see\n * [testing-library/jest-dom#tobeinthedocument](https://github.com/testing-library/jest-dom#tobeinthedocument)\n */\n toBeInTheDocument(): R;\n /**\n * @description\n * This allows you to check if an element is currently visible to the user.\n *\n * An element is visible if **all** the following conditions are met:\n * * it does not have its css property display set to none\n * * it does not have its css property visibility set to either hidden or collapse\n * * it does not have its css property opacity set to 0\n * * its parent element is also visible (and so on up to the top of the DOM tree)\n * * it does not have the hidden attribute\n * * if `<details />` it has the open attribute\n * @example\n * <div\n * data-testid=\"zero-opacity\"\n * style=\"opacity: 0\"\n * >\n * Zero Opacity\n * </div>\n *\n * <div data-testid=\"visible\">Visible Example</div>\n *\n * expect(getByTestId('zero-opacity')).not.toBeVisible()\n * expect(getByTestId('visible')).toBeVisible()\n * @see\n * [testing-library/jest-dom#tobevisible](https://github.com/testing-library/jest-dom#tobevisible)\n */\n toBeVisible(): R;\n /**\n * @deprecated\n * since v5.9.0\n * @description\n * Assert whether an element has content or not.\n * @example\n * <span data-testid=\"not-empty\">\n * <span data-testid=\"empty\"></span>\n * </span>\n *\n * expect(getByTestId('empty')).toBeEmpty()\n * expect(getByTestId('not-empty')).not.toBeEmpty()\n * @see\n * [testing-library/jest-dom#tobeempty](https://github.com/testing-library/jest-dom#tobeempty)\n */\n toBeEmpty(): R;\n /**\n * @description\n * Assert whether an element has content or not.\n * @example\n * <span data-testid=\"not-empty\">\n * <span data-testid=\"empty\"></span>\n * </span>\n *\n * expect(getByTestId('empty')).toBeEmptyDOMElement()\n * expect(getByTestId('not-empty')).not.toBeEmptyDOMElement()\n * @see\n * [testing-library/jest-dom#tobeemptydomelement](https://github.com/testing-library/jest-dom#tobeemptydomelement)\n */\n toBeEmptyDOMElement(): R;\n /**\n * @description\n * Allows you to check whether an element is disabled from the user's perspective.\n *\n * Matches if the element is a form control and the `disabled` attribute is specified on this element or the\n * element is a descendant of a form element with a `disabled` attribute.\n * @example\n * <button\n * data-testid=\"button\"\n * type=\"submit\"\n * disabled\n * >\n * submit\n * </button>\n *\n * expect(getByTestId('button')).toBeDisabled()\n * @see\n * [testing-library/jest-dom#tobedisabled](https://github.com/testing-library/jest-dom#tobedisabled)\n */\n toBeDisabled(): R;\n /**\n * @description\n * Allows you to check whether an element is not disabled from the user's perspective.\n *\n * Works like `not.toBeDisabled()`.\n *\n * Use this matcher to avoid double negation in your tests.\n * @example\n * <button\n * data-testid=\"button\"\n * type=\"submit\"\n * >\n * submit\n * </button>\n *\n * expect(getByTestId('button')).toBeEnabled()\n * @see\n * [testing-library/jest-dom#tobeenabled](https://github.com/testing-library/jest-dom#tobeenabled)\n */\n toBeEnabled(): R;\n /**\n * @description\n * Check if a form element, or the entire `form`, is currently invalid.\n *\n * An `input`, `select`, `textarea`, or `form` element is invalid if it has an `aria-invalid` attribute with no\n * value or a value of \"true\", or if the result of `checkValidity()` is false.\n * @example\n * <input data-testid=\"no-aria-invalid\" />\n *\n * <form data-testid=\"invalid-form\">\n * <input required />\n * </form>\n *\n * expect(getByTestId('no-aria-invalid')).not.toBeInvalid()\n * expect(getByTestId('invalid-form')).toBeInvalid()\n * @see\n * [testing-library/jest-dom#tobeinvalid](https://github.com/testing-library/jest-dom#tobeinvalid)\n */\n toBeInvalid(): R;\n /**\n * @description\n * This allows you to check if a form element is currently required.\n *\n * An element is required if it is having a `required` or `aria-required=\"true\"` attribute.\n * @example\n * <input data-testid=\"required-input\" required />\n * <div\n * data-testid=\"supported-role\"\n * role=\"tree\"\n * required />\n *\n * expect(getByTestId('required-input')).toBeRequired()\n * expect(getByTestId('supported-role')).not.toBeRequired()\n * @see\n * [testing-library/jest-dom#toberequired](https://github.com/testing-library/jest-dom#toberequired)\n */\n toBeRequired(): R;\n /**\n * @description\n * Allows you to check if a form element is currently required.\n *\n * An `input`, `select`, `textarea`, or `form` element is invalid if it has an `aria-invalid` attribute with no\n * value or a value of \"false\", or if the result of `checkValidity()` is true.\n * @example\n * <input data-testid=\"aria-invalid\" aria-invalid />\n *\n * <form data-testid=\"valid-form\">\n * <input />\n * </form>\n *\n * expect(getByTestId('no-aria-invalid')).not.toBeValid()\n * expect(getByTestId('invalid-form')).toBeInvalid()\n * @see\n * [testing-library/jest-dom#tobevalid](https://github.com/testing-library/jest-dom#tobevalid)\n */\n toBeValid(): R;\n /**\n * @description\n * Allows you to assert whether an element contains another element as a descendant or not.\n * @example\n * <span data-testid=\"ancestor\">\n * <span data-testid=\"descendant\"></span>\n * </span>\n *\n * const ancestor = getByTestId('ancestor')\n * const descendant = getByTestId('descendant')\n * const nonExistantElement = getByTestId('does-not-exist')\n * expect(ancestor).toContainElement(descendant)\n * expect(descendant).not.toContainElement(ancestor)\n * expect(ancestor).not.toContainElement(nonExistantElement)\n * @see\n * [testing-library/jest-dom#tocontainelement](https://github.com/testing-library/jest-dom#tocontainelement)\n */\n toContainElement(element: HTMLElement | SVGElement | null): R;\n /**\n * @description\n * Assert whether a string representing a HTML element is contained in another element.\n * @example\n * <span data-testid=\"parent\"><span data-testid=\"child\"></span></span>\n *\n * expect(getByTestId('parent')).toContainHTML('<span data-testid=\"child\"></span>')\n * @see\n * [testing-library/jest-dom#tocontainhtml](https://github.com/testing-library/jest-dom#tocontainhtml)\n */\n toContainHTML(htmlText: string): R;\n /**\n * @description\n * Allows you to check if a given element has an attribute or not.\n *\n * You can also optionally check that the attribute has a specific expected value or partial match using\n * [expect.stringContaining](https://jestjs.io/docs/en/expect.html#expectnotstringcontainingstring) or\n * [expect.stringMatching](https://jestjs.io/docs/en/expect.html#expectstringmatchingstring-regexp).\n * @example\n * <button\n * data-testid=\"ok-button\"\n * type=\"submit\"\n * disabled\n * >\n * ok\n * </button>\n *\n * expect(button).toHaveAttribute('disabled')\n * expect(button).toHaveAttribute('type', 'submit')\n * expect(button).not.toHaveAttribute('type', 'button')\n * @see\n * [testing-library/jest-dom#tohaveattribute](https://github.com/testing-library/jest-dom#tohaveattribute)\n */\n toHaveAttribute(attr: string, value?: unknown): R;\n /**\n * @description\n * Check whether the given element has certain classes within its `class` attribute.\n *\n * You must provide at least one class, unless you are asserting that an element does not have any classes.\n * @example\n * <button\n * data-testid=\"delete-button\"\n * class=\"btn xs btn-danger\"\n * >\n * delete item\n * </button>\n *\n * <div data-testid=\"no-classes\">no classes</div>\n *\n * const deleteButton = getByTestId('delete-button')\n * const noClasses = getByTestId('no-classes')\n * expect(deleteButton).toHaveClass('btn')\n * expect(deleteButton).toHaveClass('btn-danger xs')\n * expect(deleteButton).toHaveClass('btn xs btn-danger', {exact: true})\n * expect(deleteButton).not.toHaveClass('btn xs btn-danger', {exact: true})\n * expect(noClasses).not.toHaveClass()\n * @see\n * [testing-library/jest-dom#tohaveclass](https://github.com/testing-library/jest-dom#tohaveclass)\n */\n toHaveClass(...classNames: string[]): R;\n toHaveClass(classNames: string, options?: { exact: boolean }): R;\n /**\n * @description\n * This allows you to check whether the given form element has the specified displayed value (the one the\n * end user will see). It accepts <input>, <select> and <textarea> elements with the exception of <input type=\"checkbox\">\n * and <input type=\"radio\">, which can be meaningfully matched only using toBeChecked or toHaveFormValues.\n * @example\n * <label for=\"input-example\">First name</label>\n * <input type=\"text\" id=\"input-example\" value=\"Luca\" />\n *\n * <label for=\"textarea-example\">Description</label>\n * <textarea id=\"textarea-example\">An example description here.</textarea>\n *\n * <label for=\"single-select-example\">Fruit</label>\n * <select id=\"single-select-example\">\n * <option value=\"\">Select a fruit...</option>\n * <option value=\"banana\">Banana</option>\n * <option value=\"ananas\">Ananas</option>\n * <option value=\"avocado\">Avocado</option>\n * </select>\n *\n * <label for=\"mutiple-select-example\">Fruits</label>\n * <select id=\"multiple-select-example\" multiple>\n * <option value=\"\">Select a fruit...</option>\n * <option value=\"banana\" selected>Banana</option>\n * <option value=\"ananas\">Ananas</option>\n * <option value=\"avocado\" selected>Avocado</option>\n * </select>\n *\n * const input = screen.getByLabelText('First name')\n * const textarea = screen.getByLabelText('Description')\n * const selectSingle = screen.getByLabelText('Fruit')\n * const selectMultiple = screen.getByLabelText('Fruits')\n *\n * expect(input).toHaveDisplayValue('Luca')\n * expect(textarea).toHaveDisplayValue('An example description here.')\n * expect(selectSingle).toHaveDisplayValue('Select a fruit...')\n * expect(selectMultiple).toHaveDisplayValue(['Banana', 'Avocado'])\n *\n * @see\n * [testing-library/jest-dom#tohavedisplayvalue](https://github.com/testing-library/jest-dom#tohavedisplayvalue)\n */\n toHaveDisplayValue(value: string | RegExp | Array<string | RegExp>): R;\n /**\n * @description\n * Assert whether an element has focus or not.\n * @example\n * <div>\n * <input type=\"text\" data-testid=\"element-to-focus\" />\n * </div>\n *\n * const input = getByTestId('element-to-focus')\n * input.focus()\n * expect(input).toHaveFocus()\n * input.blur()\n * expect(input).not.toHaveFocus()\n * @see\n * [testing-library/jest-dom#tohavefocus](https://github.com/testing-library/jest-dom#tohavefocus)\n */\n toHaveFocus(): R;\n /**\n * @description\n * Check if a form or fieldset contains form controls for each given name, and having the specified value.\n *\n * Can only be invoked on a form or fieldset element.\n * @example\n * <form data-testid=\"login-form\">\n * <input type=\"text\" name=\"username\" value=\"jane.doe\" />\n * <input type=\"password\" name=\"password\" value=\"123\" />\n * <input type=\"checkbox\" name=\"rememberMe\" checked />\n * <button type=\"submit\">Sign in</button>\n * </form>\n *\n * expect(getByTestId('login-form')).toHaveFormValues({\n * username: 'jane.doe',\n * rememberMe: true,\n * })\n * @see\n * [testing-library/jest-dom#tohaveformvalues](https://github.com/testing-library/jest-dom#tohaveformvalues)\n */\n toHaveFormValues(expectedValues: Record<string, unknown>): R;\n /**\n * @description\n * Check if an element has specific css properties with specific values applied.\n *\n * Only matches if the element has *all* the expected properties applied, not just some of them.\n * @example\n * <button\n * data-test-id=\"submit-button\"\n * style=\"background-color: green; display: none\"\n * >\n * submit\n * </button>\n *\n * const button = getByTestId('submit-button')\n * expect(button).toHaveStyle('background-color: green')\n * expect(button).toHaveStyle({\n * 'background-color': 'green',\n * display: 'none'\n * })\n * @see\n * [testing-library/jest-dom#tohavestyle](https://github.com/testing-library/jest-dom#tohavestyle)\n */\n toHaveStyle(css: string | Record<string, unknown>): R;\n /**\n * @description\n * Check whether the given element has a text content or not.\n *\n * When a string argument is passed through, it will perform a partial case-sensitive match to the element\n * content.\n *\n * To perform a case-insensitive match, you can use a RegExp with the `/i` modifier.\n *\n * If you want to match the whole content, you can use a RegExp to do it.\n * @example\n * <span data-testid=\"text-content\">Text Content</span>\n *\n * const element = getByTestId('text-content')\n * expect(element).toHaveTextContent('Content')\n * // to match the whole content\n * expect(element).toHaveTextContent(/^Text Content$/)\n * // to use case-insentive match\n * expect(element).toHaveTextContent(/content$/i)\n * expect(element).not.toHaveTextContent('content')\n * @see\n * [testing-library/jest-dom#tohavetextcontent](https://github.com/testing-library/jest-dom#tohavetextcontent)\n */\n toHaveTextContent(\n text: string | RegExp,\n options?: { normalizeWhitespace: boolean },\n ): R;\n /**\n * @description\n * Check whether the given form element has the specified value.\n *\n * Accepts `<input>`, `<select>`, and `<textarea>` elements with the exception of `<input type=\"checkbox\">` and\n * `<input type=\"radiobox\">`, which can be matched only using\n * [toBeChecked](https://github.com/testing-library/jest-dom#tobechecked) or\n * [toHaveFormValues](https://github.com/testing-library/jest-dom#tohaveformvalues).\n * @example\n * <input\n * type=\"number\"\n * value=\"5\"\n * data-testid=\"input-number\" />\n *\n * const numberInput = getByTestId('input-number')\n * expect(numberInput).toHaveValue(5)\n * @see\n * [testing-library/jest-dom#tohavevalue](https://github.com/testing-library/jest-dom#tohavevalue)\n */\n toHaveValue(value?: string | string[] | number | null): R;\n /**\n * @description\n * Assert whether the given element is checked.\n *\n * It accepts an `input` of type `checkbox` or `radio` and elements with a `role` of `radio` with a valid\n * `aria-checked` attribute of \"true\" or \"false\".\n * @example\n * <input\n * type=\"checkbox\"\n * checked\n * data-testid=\"input-checkbox\" />\n * <input\n * type=\"radio\"\n * value=\"foo\"\n * data-testid=\"input-radio\" />\n *\n * const inputCheckbox = getByTestId('input-checkbox')\n * const inputRadio = getByTestId('input-radio')\n * expect(inputCheckbox).toBeChecked()\n * expect(inputRadio).not.toBeChecked()\n * @see\n * [testing-library/jest-dom#tobechecked](https://github.com/testing-library/jest-dom#tobechecked)\n */\n toBeChecked(): R;\n /**\n * @deprecated\n * since v5.14.1\n * @description\n * Check the accessible description for an element.\n * This allows you to check whether the given element has a description or not.\n *\n * An element gets its description via the\n * [`aria-describedby` attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).\n * Set this to the `id` of one or more other elements. These elements may be nested\n * inside, be outside, or a sibling of the passed in element.\n *\n * Whitespace is normalized. Using multiple ids will\n * [join the referenced elements’ text content separated by a space](https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description).\n *\n * When a `string` argument is passed through, it will perform a whole\n * case-sensitive match to the description text.\n *\n * To perform a case-insensitive match, you can use a `RegExp` with the `/i`\n * modifier.\n *\n * To perform a partial match, you can pass a `RegExp` or use\n * `expect.stringContaining(\"partial string\")`.\n *\n * @example\n * <button aria-label=\"Close\" aria-describedby=\"description-close\">\n * X\n * </button>\n * <div id=\"description-close\">\n * Closing will discard any changes\n * </div>\n *\n * <button>Delete</button>\n *\n * const closeButton = getByRole('button', {name: 'Close'})\n *\n * expect(closeButton).toHaveDescription('Closing will discard any changes')\n * expect(closeButton).toHaveDescription(/will discard/) // to partially match\n * expect(closeButton).toHaveDescription(expect.stringContaining('will discard')) // to partially match\n * expect(closeButton).toHaveDescription(/^closing/i) // to use case-insensitive match\n * expect(closeButton).not.toHaveDescription('Other description')\n *\n * const deleteButton = getByRole('button', {name: 'Delete'})\n * expect(deleteButton).not.toHaveDescription()\n * expect(deleteButton).toHaveDescription('') // Missing or empty description always becomes a blank string\n * @see\n * [testing-library/jest-dom#tohavedescription](https://github.com/testing-library/jest-dom#tohavedescription)\n */\n toHaveDescription(text?: string | RegExp | E): R;\n /**\n * @description\n * This allows to assert that an element has the expected [accessible description](https://w3c.github.io/accname/).\n *\n * You can pass the exact string of the expected accessible description, or you can make a\n * partial match passing a regular expression, or by using either\n * [expect.stringContaining](https://jestjs.io/docs/en/expect.html#expectnotstringcontainingstring)\n * or [expect.stringMatching](https://jestjs.io/docs/en/expect.html#expectstringmatchingstring-regexp).\n * @example\n * <a data-testid=\"link\" href=\"/\" aria-label=\"Home page\" title=\"A link to start over\">Start</a>\n * <a data-testid=\"extra-link\" href=\"/about\" aria-label=\"About page\">About</a>\n * <img src=\"avatar.jpg\" data-testid=\"avatar\" alt=\"User profile pic\" />\n * <img src=\"logo.jpg\" data-testid=\"logo\" alt=\"Company logo\" aria-describedby=\"t1\" />\n * <span id=\"t1\" role=\"presentation\">The logo of Our Company</span>\n *\n * expect(getByTestId('link')).toHaveAccessibleDescription()\n * expect(getByTestId('link')).toHaveAccessibleDescription('A link to start over')\n * expect(getByTestId('link')).not.toHaveAccessibleDescription('Home page')\n * expect(getByTestId('extra-link')).not.toHaveAccessibleDescription()\n * expect(getByTestId('avatar')).not.toHaveAccessibleDescription()\n * expect(getByTestId('logo')).not.toHaveAccessibleDescription('Company logo')\n * expect(getByTestId('logo')).toHaveAccessibleDescription('The logo of Our Company')\n * @see\n * [testing-library/jest-dom#tohaveaccessibledescription](https://github.com/testing-library/jest-dom#tohaveaccessibledescription)\n */\n toHaveAccessibleDescription(text?: string | RegExp | E): R;\n /**\n * @description\n * This allows you to assert that an element has the expected\n * [accessible error message](https://w3c.github.io/aria/#aria-errormessage).\n *\n * You can pass the exact string of the expected accessible error message.\n * Alternatively, you can perform a partial match by passing a regular expression\n * or by using either\n * [expect.stringContaining](https://jestjs.io/docs/en/expect.html#expectnotstringcontainingstring)\n * or [expect.stringMatching](https://jestjs.io/docs/en/expect.html#expectstringmatchingstring-regexp).\n *\n * @example\n * <input aria-label=\"Has Error\" aria-invalid=\"true\" aria-errormessage=\"error-message\" />\n * <div id=\"error-message\" role=\"alert\">This field is invalid</div>\n *\n * <input aria-label=\"No Error Attributes\" />\n * <input aria-label=\"Not Invalid\" aria-invalid=\"false\" aria-errormessage=\"error-message\" />\n *\n * // Inputs with Valid Error Messages\n * expect(getByRole('textbox', {name: 'Has Error'})).toHaveAccessibleErrorMessage()\n * expect(getByRole('textbox', {name: 'Has Error'})).toHaveAccessibleErrorMessage('This field is invalid')\n * expect(getByRole('textbox', {name: 'Has Error'})).toHaveAccessibleErrorMessage(/invalid/i)\n * expect(\n * getByRole('textbox', {name: 'Has Error'}),\n * ).not.toHaveAccessibleErrorMessage('This field is absolutely correct!')\n *\n * // Inputs without Valid Error Messages\n * expect(\n * getByRole('textbox', {name: 'No Error Attributes'}),\n * ).not.toHaveAccessibleErrorMessage()\n *\n * expect(\n * getByRole('textbox', {name: 'Not Invalid'}),\n * ).not.toHaveAccessibleErrorMessage()\n *\n * @see\n * [testing-library/jest-dom#tohaveaccessibleerrormessage](https://github.com/testing-library/jest-dom#tohaveaccessibleerrormessage)\n */\n toHaveAccessibleErrorMessage(text?: string | RegExp | E): R;\n /**\n * @description\n * This allows to assert that an element has the expected [accessible name](https://w3c.github.io/accname/).\n * It is useful, for instance, to assert that form elements and buttons are properly labelled.\n *\n * You can pass the exact string of the expected accessible name, or you can make a\n * partial match passing a regular expression, or by using either\n * [expect.stringContaining](https://jestjs.io/docs/en/expect.html#expectnotstringcontainingstring)\n * or [expect.stringMatching](https://jestjs.io/docs/en/expect.html#expectstringmatchingstring-regexp).\n * @example\n * <img data-testid=\"img-alt\" src=\"\" alt=\"Test alt\" />\n * <img data-testid=\"img-empty-alt\" src=\"\" alt=\"\" />\n * <svg data-testid=\"svg-title\"><title>Test title</title></svg>\n * <button data-testid=\"button-img-alt\"><img src=\"\" alt=\"Test\" /></button>\n * <p><img data-testid=\"img-paragraph\" src=\"\" alt=\"\" /> Test content</p>\n * <button data-testid=\"svg-button\"><svg><title>Test</title></svg></p>\n * <div><svg data-testid=\"svg-without-title\"></svg></div>\n * <input data-testid=\"input-title\" title=\"test\" />\n *\n * expect(getByTestId('img-alt')).toHaveAccessibleName('Test alt')\n * expect(getByTestId('img-empty-alt')).not.toHaveAccessibleName()\n * expect(getByTestId('svg-title')).toHaveAccessibleName('Test title')\n * expect(getByTestId('button-img-alt')).toHaveAccessibleName()\n * expect(getByTestId('img-paragraph')).not.toHaveAccessibleName()\n * expect(getByTestId('svg-button')).toHaveAccessibleName()\n * expect(getByTestId('svg-without-title')).not.toHaveAccessibleName()\n * expect(getByTestId('input-title')).toHaveAccessibleName()\n * @see\n * [testing-library/jest-dom#tohaveaccessiblename](https://github.com/testing-library/jest-dom#tohaveaccessiblename)\n */\n toHaveAccessibleName(text?: string | RegExp | E): R;\n /**\n * @description\n * This allows you to check whether the given element is partially checked.\n * It accepts an input of type checkbox and elements with a role of checkbox\n * with a aria-checked=\"mixed\", or input of type checkbox with indeterminate\n * set to true\n *\n * @example\n * <input type=\"checkbox\" aria-checked=\"mixed\" data-testid=\"aria-checkbox-mixed\" />\n * <input type=\"checkbox\" checked data-testid=\"input-checkbox-checked\" />\n * <input type=\"checkbox\" data-testid=\"input-checkbox-unchecked\" />\n * <div role=\"checkbox\" aria-checked=\"true\" data-testid=\"aria-checkbox-checked\" />\n * <div\n * role=\"checkbox\"\n * aria-checked=\"false\"\n * data-testid=\"aria-checkbox-unchecked\"\n * />\n * <input type=\"checkbox\" data-testid=\"input-checkbox-indeterminate\" />\n *\n * const ariaCheckboxMixed = getByTestId('aria-checkbox-mixed')\n * const inputCheckboxChecked = getByTestId('input-checkbox-checked')\n * const inputCheckboxUnchecked = getByTestId('input-checkbox-unchecked')\n * const ariaCheckboxChecked = getByTestId('aria-checkbox-checked')\n * const ariaCheckboxUnchecked = getByTestId('aria-checkbox-unchecked')\n * const inputCheckboxIndeterminate = getByTestId('input-checkbox-indeterminate')\n *\n * expect(ariaCheckboxMixed).toBePartiallyChecked()\n * expect(inputCheckboxChecked).not.toBePartiallyChecked()\n * expect(inputCheckboxUnchecked).not.toBePartiallyChecked()\n * expect(ariaCheckboxChecked).not.toBePartiallyChecked()\n * expect(ariaCheckboxUnchecked).not.toBePartiallyChecked()\n *\n * inputCheckboxIndeterminate.indeterminate = true\n * expect(inputCheckboxIndeterminate).toBePartiallyChecked()\n * @see\n * [testing-library/jest-dom#tobepartiallychecked](https://github.com/testing-library/jest-dom#tobepartiallychecked)\n */\n toBePartiallyChecked(): R;\n /**\n * @description\n *\n * Check whether the given element has an [ARIA error message](https://www.w3.org/TR/wai-aria/#aria-errormessage) or not.\n *\n * Use the `aria-errormessage` attribute to reference another element that contains\n * custom error message text. Multiple ids is **NOT** allowed. Authors MUST use\n * `aria-invalid` in conjunction with `aria-errormessage`. Learn more from the\n * [`aria-errormessage` spec](https://www.w3.org/TR/wai-aria/#aria-errormessage).\n *\n * Whitespace is normalized.\n *\n * When a `string` argument is passed through, it will perform a whole\n * case-sensitive match to the error message text.\n *\n * To perform a case-insensitive match, you can use a `RegExp` with the `/i`\n * modifier.\n *\n * To perform a partial match, you can pass a `RegExp` or use\n * expect.stringContaining(\"partial string\")`.\n *\n * @example\n * <label for=\"startTime\"> Please enter a start time for the meeting: </label>\n * <input id=\"startTime\" type=\"text\" aria-errormessage=\"msgID\" aria-invalid=\"true\" value=\"11:30 PM\" />\n * <span id=\"msgID\" aria-live=\"assertive\" style=\"visibility:visible\">\n * Invalid time: the time must be between 9:00 AM and 5:00 PM\"\n * </span>\n *\n *\n * const timeInput = getByLabel('startTime')\n *\n * expect(timeInput).toHaveErrorMessage(\n * 'Invalid time: the time must be between 9:00 AM and 5:00 PM',\n * )\n * expect(timeInput).toHaveErrorMessage(/invalid time/i) // to partially match\n * expect(timeInput).toHaveErrorMessage(expect.stringContaining('Invalid time')) // to partially match\n * expect(timeInput).not.toHaveErrorMessage('Pikachu!')\n * @see\n * [testing-library/jest-dom#tohaveerrormessage](https://github.com/testing-library/jest-dom#tohaveerrormessage)\n */\n toHaveErrorMessage(text?: string | RegExp | E): R;\n}\n"],"mappings":";;;;;;;AAAA,OAAO,YAAY;;;ACEnB,IAAM,YAAY;AAElB,SAAS,SAAS,KAAK,SAAS;AAC9B,YAAU,WAAW,CAAC;AAMtB,MAAI,SAAS;AACb,MAAI,SAAS;AAMb,WAAS,eAAe,KAAK;AAC3B,QAAI,QAAQ,IAAI,MAAM,KAAK;AAC3B,QAAI;AAAO,gBAAU,MAAM;AAC3B,QAAI,IAAI,IAAI,YAAY,IAAI;AAC5B,aAAS,CAAC,IAAI,IAAI,SAAS,IAAI,SAAS,IAAI;AAAA,EAC9C;AAMA,WAAS,WAAW;AAClB,QAAI,QAAQ,EAA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