1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.wrapsIntrinsicElement = wrapsIntrinsicElement;
|
7 | exports.default = findOutermostIntrinsic;
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | function wrapsIntrinsicElement(reactWrapper) {
|
16 | return typeof reactWrapper.type() === 'string';
|
17 | }
|
18 |
|
19 | var warnedOnce = false;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | function findOutermostIntrinsic(reactWrapper) {
|
28 | if (!warnedOnce) {
|
29 | warnedOnce = true;
|
30 | console.warn(['Material-UI: the test utils are deprecated, they are no longer present in v5.', 'The helpers were designed to work with enzyme.', 'However, the tests of the core components were moved to react-testing-library.'].join('\n'));
|
31 | }
|
32 |
|
33 | return reactWrapper.findWhere(function (n) {
|
34 | return n.exists() && wrapsIntrinsicElement(n);
|
35 | }).first();
|
36 | } |
\ | No newline at end of file |