@mui/internal-test-utils 2.0.18-canary.7 → 2.0.18-canary.8
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/{esm/chaiPlugin.js → chaiPlugin.mjs} +1 -1
- package/{esm/createRenderer.d.ts → createRenderer.d.mts} +1 -1
- package/{esm/createRenderer.js → createRenderer.mjs} +3 -3
- package/{esm/describeConformance.d.ts → describeConformance.d.mts} +2 -2
- package/{esm/describeConformance.js → describeConformance.mjs} +2 -2
- package/{esm/flushMicrotasks.js → flushMicrotasks.mjs} +1 -1
- package/{esm/focusVisible.js → focusVisible.mjs} +1 -1
- package/index.d.mts +11 -0
- package/{esm/index.js → index.mjs} +10 -10
- package/initMatchers.d.mts +5 -0
- package/{esm/initMatchers.js → initMatchers.mjs} +2 -2
- package/package.json +53 -22
- package/{esm/setupVitest.d.ts → setupVitest.d.mts} +2 -2
- package/{esm/setupVitest.js → setupVitest.mjs} +3 -3
- package/esm/index.d.ts +0 -11
- package/esm/initMatchers.d.ts +0 -5
- package/esm/package.json +0 -1
- /package/{esm/chaiPlugin.d.ts → chaiPlugin.d.mts} +0 -0
- /package/{esm/chaiTypes.d.ts → chaiTypes.d.mts} +0 -0
- /package/{esm/chaiTypes.js → chaiTypes.mjs} +0 -0
- /package/{esm/components.d.ts → components.d.mts} +0 -0
- /package/{esm/components.js → components.mjs} +0 -0
- /package/{esm/configure.d.ts → configure.d.mts} +0 -0
- /package/{esm/configure.js → configure.mjs} +0 -0
- /package/{esm/createDescribe.d.ts → createDescribe.d.mts} +0 -0
- /package/{esm/createDescribe.js → createDescribe.mjs} +0 -0
- /package/{esm/env.d.ts → env.d.mts} +0 -0
- /package/{esm/env.js → env.mjs} +0 -0
- /package/{esm/flushMicrotasks.d.ts → flushMicrotasks.d.mts} +0 -0
- /package/{esm/focusVisible.d.ts → focusVisible.d.mts} +0 -0
- /package/{esm/ignoreActWarnings.d.ts → ignoreActWarnings.d.mts} +0 -0
- /package/{esm/ignoreActWarnings.js → ignoreActWarnings.mjs} +0 -0
- /package/{esm/initPlaywrightMatchers.d.ts → initPlaywrightMatchers.d.mts} +0 -0
- /package/{esm/initPlaywrightMatchers.js → initPlaywrightMatchers.mjs} +0 -0
|
@@ -5,7 +5,7 @@ import { computeAccessibleDescription, computeAccessibleName } from 'dom-accessi
|
|
|
5
5
|
import formatUtil from 'format-util';
|
|
6
6
|
import { kebabCase } from 'es-toolkit/string';
|
|
7
7
|
import { AssertionError } from 'assertion-error';
|
|
8
|
-
import { isJsdom } from "./env.
|
|
8
|
+
import { isJsdom } from "./env.mjs";
|
|
9
9
|
|
|
10
10
|
// chai#utils.elToString that looks like stringified elements in testing-library
|
|
11
11
|
function elementToString(element) {
|
|
@@ -2,7 +2,7 @@ import { queries, RenderResult, Screen, RenderOptions as TestingLibraryRenderOpt
|
|
|
2
2
|
import { userEvent } from '@testing-library/user-event';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useFakeTimers } from 'sinon';
|
|
5
|
-
import { flushMicrotasks } from "./flushMicrotasks.
|
|
5
|
+
import { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
6
6
|
declare function queryAllDescriptionsOf(baseElement: HTMLElement, element: Element): HTMLElement[];
|
|
7
7
|
declare const customQueries: {
|
|
8
8
|
queryDescriptionOf: import("@testing-library/dom").QueryBy<[Element]>;
|
|
@@ -5,9 +5,9 @@ import { userEvent } from '@testing-library/user-event';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import * as ReactDOMServer from 'react-dom/server';
|
|
7
7
|
import { beforeEach, afterEach, beforeAll, vi } from 'vitest';
|
|
8
|
-
import { reactMajor } from "./env.
|
|
9
|
-
import { flushMicrotasks } from "./flushMicrotasks.
|
|
10
|
-
import { config as utilsConfig } from "./configure.
|
|
8
|
+
import { reactMajor } from "./env.mjs";
|
|
9
|
+
import { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
10
|
+
import { config as utilsConfig } from "./configure.mjs";
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
function queryAllDescriptionsOf(baseElement, element) {
|
|
13
13
|
const ariaDescribedBy = element.getAttribute('aria-describedby');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MuiRenderResult } from "./createRenderer.
|
|
2
|
+
import { MuiRenderResult } from "./createRenderer.mjs";
|
|
3
3
|
interface DataProps {
|
|
4
4
|
[key: `data-${string}`]: string;
|
|
5
5
|
}
|
|
@@ -192,5 +192,5 @@ declare const fullSuite: {
|
|
|
192
192
|
themeVariants: typeof testThemeVariants;
|
|
193
193
|
themeCustomPalette: typeof testThemeCustomPalette;
|
|
194
194
|
};
|
|
195
|
-
declare const _default: import("./createDescribe.
|
|
195
|
+
declare const _default: import("./createDescribe.mjs").MUIDescribe<[minimalElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>, getOptions: () => ConformanceOptions]>;
|
|
196
196
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { describe, it, afterAll, afterEach, beforeEach } from 'vitest';
|
|
4
|
-
import createDescribe from "./createDescribe.
|
|
5
|
-
import { isJsdom } from "./env.
|
|
4
|
+
import createDescribe from "./createDescribe.mjs";
|
|
5
|
+
import { isJsdom } from "./env.mjs";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
function capitalize(string) {
|
|
8
8
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./initMatchers.mjs";
|
|
2
|
+
export * from "./components.mjs";
|
|
3
|
+
export { default as describeConformance } from "./describeConformance.mjs";
|
|
4
|
+
export * from "./describeConformance.mjs";
|
|
5
|
+
export { default as createDescribe } from "./createDescribe.mjs";
|
|
6
|
+
export * from "./createRenderer.mjs";
|
|
7
|
+
export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.mjs";
|
|
8
|
+
export { fireEvent as fireDiscreteEvent } from '@testing-library/react/pure.js';
|
|
9
|
+
export { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
10
|
+
export * from "./env.mjs";
|
|
11
|
+
export { ignoreActWarnings } from "./ignoreActWarnings.mjs";
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
* This source code is licensed under the undefined license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
import "./initMatchers.
|
|
9
|
-
export * from "./components.
|
|
10
|
-
export { default as describeConformance } from "./describeConformance.
|
|
11
|
-
export * from "./describeConformance.
|
|
12
|
-
export { default as createDescribe } from "./createDescribe.
|
|
13
|
-
export * from "./createRenderer.
|
|
14
|
-
export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.
|
|
8
|
+
import "./initMatchers.mjs";
|
|
9
|
+
export * from "./components.mjs";
|
|
10
|
+
export { default as describeConformance } from "./describeConformance.mjs";
|
|
11
|
+
export * from "./describeConformance.mjs";
|
|
12
|
+
export { default as createDescribe } from "./createDescribe.mjs";
|
|
13
|
+
export * from "./createRenderer.mjs";
|
|
14
|
+
export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.mjs";
|
|
15
15
|
// eslint-disable-next-line import/extensions
|
|
16
16
|
export { fireEvent as fireDiscreteEvent } from '@testing-library/react/pure.js';
|
|
17
|
-
export { flushMicrotasks } from "./flushMicrotasks.
|
|
18
|
-
export * from "./env.
|
|
19
|
-
export { ignoreActWarnings } from "./ignoreActWarnings.
|
|
17
|
+
export { flushMicrotasks } from "./flushMicrotasks.mjs";
|
|
18
|
+
export * from "./env.mjs";
|
|
19
|
+
export { ignoreActWarnings } from "./ignoreActWarnings.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/internal-test-utils",
|
|
3
|
-
"version": "2.0.18-canary.
|
|
3
|
+
"version": "2.0.18-canary.8",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "Utilities for MUI tests. This is an internal package not meant for general use.",
|
|
6
6
|
"repository": {
|
|
@@ -44,91 +44,122 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"type": "commonjs",
|
|
47
|
-
"main": "./index.js",
|
|
48
|
-
"types": "./index.d.ts",
|
|
49
47
|
"exports": {
|
|
50
48
|
"./package.json": "./package.json",
|
|
51
49
|
".": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./index.d.mts",
|
|
52
|
+
"default": "./index.mjs"
|
|
53
|
+
},
|
|
52
54
|
"require": {
|
|
53
55
|
"types": "./index.d.ts",
|
|
54
56
|
"default": "./index.js"
|
|
55
57
|
},
|
|
56
58
|
"default": {
|
|
57
|
-
"types": "./
|
|
58
|
-
"default": "./
|
|
59
|
+
"types": "./index.d.mts",
|
|
60
|
+
"default": "./index.mjs"
|
|
59
61
|
}
|
|
60
62
|
},
|
|
61
63
|
"./createDescribe": {
|
|
64
|
+
"import": {
|
|
65
|
+
"types": "./createDescribe.d.mts",
|
|
66
|
+
"default": "./createDescribe.mjs"
|
|
67
|
+
},
|
|
62
68
|
"require": {
|
|
63
69
|
"types": "./createDescribe.d.ts",
|
|
64
70
|
"default": "./createDescribe.js"
|
|
65
71
|
},
|
|
66
72
|
"default": {
|
|
67
|
-
"types": "./
|
|
68
|
-
"default": "./
|
|
73
|
+
"types": "./createDescribe.d.mts",
|
|
74
|
+
"default": "./createDescribe.mjs"
|
|
69
75
|
}
|
|
70
76
|
},
|
|
71
77
|
"./createRenderer": {
|
|
78
|
+
"import": {
|
|
79
|
+
"types": "./createRenderer.d.mts",
|
|
80
|
+
"default": "./createRenderer.mjs"
|
|
81
|
+
},
|
|
72
82
|
"require": {
|
|
73
83
|
"types": "./createRenderer.d.ts",
|
|
74
84
|
"default": "./createRenderer.js"
|
|
75
85
|
},
|
|
76
86
|
"default": {
|
|
77
|
-
"types": "./
|
|
78
|
-
"default": "./
|
|
87
|
+
"types": "./createRenderer.d.mts",
|
|
88
|
+
"default": "./createRenderer.mjs"
|
|
79
89
|
}
|
|
80
90
|
},
|
|
81
91
|
"./initMatchers": {
|
|
92
|
+
"import": {
|
|
93
|
+
"types": "./initMatchers.d.mts",
|
|
94
|
+
"default": "./initMatchers.mjs"
|
|
95
|
+
},
|
|
82
96
|
"require": {
|
|
83
97
|
"types": "./initMatchers.d.ts",
|
|
84
98
|
"default": "./initMatchers.js"
|
|
85
99
|
},
|
|
86
100
|
"default": {
|
|
87
|
-
"types": "./
|
|
88
|
-
"default": "./
|
|
101
|
+
"types": "./initMatchers.d.mts",
|
|
102
|
+
"default": "./initMatchers.mjs"
|
|
89
103
|
}
|
|
90
104
|
},
|
|
91
105
|
"./env": {
|
|
106
|
+
"import": {
|
|
107
|
+
"types": "./env.d.mts",
|
|
108
|
+
"default": "./env.mjs"
|
|
109
|
+
},
|
|
92
110
|
"require": {
|
|
93
111
|
"types": "./env.d.ts",
|
|
94
112
|
"default": "./env.js"
|
|
95
113
|
},
|
|
96
114
|
"default": {
|
|
97
|
-
"types": "./
|
|
98
|
-
"default": "./
|
|
115
|
+
"types": "./env.d.mts",
|
|
116
|
+
"default": "./env.mjs"
|
|
99
117
|
}
|
|
100
118
|
},
|
|
101
119
|
"./initPlaywrightMatchers": {
|
|
120
|
+
"import": {
|
|
121
|
+
"types": "./initPlaywrightMatchers.d.mts",
|
|
122
|
+
"default": "./initPlaywrightMatchers.mjs"
|
|
123
|
+
},
|
|
102
124
|
"require": {
|
|
103
125
|
"types": "./initPlaywrightMatchers.d.ts",
|
|
104
126
|
"default": "./initPlaywrightMatchers.js"
|
|
105
127
|
},
|
|
106
128
|
"default": {
|
|
107
|
-
"types": "./
|
|
108
|
-
"default": "./
|
|
129
|
+
"types": "./initPlaywrightMatchers.d.mts",
|
|
130
|
+
"default": "./initPlaywrightMatchers.mjs"
|
|
109
131
|
}
|
|
110
132
|
},
|
|
111
133
|
"./chaiPlugin": {
|
|
134
|
+
"import": {
|
|
135
|
+
"types": "./chaiPlugin.d.mts",
|
|
136
|
+
"default": "./chaiPlugin.mjs"
|
|
137
|
+
},
|
|
112
138
|
"require": {
|
|
113
139
|
"types": "./chaiPlugin.d.ts",
|
|
114
140
|
"default": "./chaiPlugin.js"
|
|
115
141
|
},
|
|
116
142
|
"default": {
|
|
117
|
-
"types": "./
|
|
118
|
-
"default": "./
|
|
143
|
+
"types": "./chaiPlugin.d.mts",
|
|
144
|
+
"default": "./chaiPlugin.mjs"
|
|
119
145
|
}
|
|
120
146
|
},
|
|
121
147
|
"./setupVitest": {
|
|
148
|
+
"import": {
|
|
149
|
+
"types": "./setupVitest.d.mts",
|
|
150
|
+
"default": "./setupVitest.mjs"
|
|
151
|
+
},
|
|
122
152
|
"require": {
|
|
123
153
|
"types": "./setupVitest.d.ts",
|
|
124
154
|
"default": "./setupVitest.js"
|
|
125
155
|
},
|
|
126
156
|
"default": {
|
|
127
|
-
"types": "./
|
|
128
|
-
"default": "./
|
|
157
|
+
"types": "./setupVitest.d.mts",
|
|
158
|
+
"default": "./setupVitest.mjs"
|
|
129
159
|
}
|
|
130
|
-
}
|
|
131
|
-
"./esm": null
|
|
160
|
+
}
|
|
132
161
|
},
|
|
133
|
-
"
|
|
162
|
+
"main": "./index.js",
|
|
163
|
+
"types": "./index.d.ts",
|
|
164
|
+
"gitSha": "5a397056f9e93982f8e275c0214fc882d8af3b1c"
|
|
134
165
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import failOnConsole from 'vitest-fail-on-console';
|
|
2
2
|
import * as chai from 'chai';
|
|
3
|
-
import "./chaiTypes.
|
|
3
|
+
import "./chaiTypes.mjs";
|
|
4
4
|
// eslint-disable-next-line import/extensions
|
|
5
5
|
import { cleanup, act } from '@testing-library/react/pure.js';
|
|
6
6
|
import { afterEach, vi } from 'vitest';
|
|
7
7
|
import chaiDom from 'chai-dom';
|
|
8
|
-
import chaiPlugin from "./chaiPlugin.
|
|
9
|
-
import { configure } from "./configure.
|
|
8
|
+
import chaiPlugin from "./chaiPlugin.mjs";
|
|
9
|
+
import { configure } from "./configure.mjs";
|
|
10
10
|
let isInitialized = false;
|
|
11
11
|
export default function setupVitest({
|
|
12
12
|
failOnConsoleEnabled = true,
|
package/esm/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./initMatchers.js";
|
|
2
|
-
export * from "./components.js";
|
|
3
|
-
export { default as describeConformance } from "./describeConformance.js";
|
|
4
|
-
export * from "./describeConformance.js";
|
|
5
|
-
export { default as createDescribe } from "./createDescribe.js";
|
|
6
|
-
export * from "./createRenderer.js";
|
|
7
|
-
export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.js";
|
|
8
|
-
export { fireEvent as fireDiscreteEvent } from '@testing-library/react/pure.js';
|
|
9
|
-
export { flushMicrotasks } from "./flushMicrotasks.js";
|
|
10
|
-
export * from "./env.js";
|
|
11
|
-
export { ignoreActWarnings } from "./ignoreActWarnings.js";
|
package/esm/initMatchers.d.ts
DELETED
package/esm/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module","sideEffects":false}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{esm/env.js → env.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|