@mui/internal-test-utils 2.0.18-canary.2 → 2.0.18-canary.20

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.
Files changed (41) hide show
  1. package/README.md +23 -12
  2. package/{esm/chaiPlugin.js → chaiPlugin.mjs} +1 -1
  3. package/{esm/createRenderer.d.ts → createRenderer.d.mts} +59 -59
  4. package/createRenderer.d.ts +58 -58
  5. package/{esm/createRenderer.js → createRenderer.mjs} +3 -3
  6. package/{esm/describeConformance.d.ts → describeConformance.d.mts} +2 -20
  7. package/describeConformance.d.ts +0 -18
  8. package/describeConformance.js +2 -173
  9. package/{esm/describeConformance.js → describeConformance.mjs} +4 -175
  10. package/{esm/flushMicrotasks.js → flushMicrotasks.mjs} +1 -1
  11. package/{esm/focusVisible.js → focusVisible.mjs} +1 -1
  12. package/index.d.mts +11 -0
  13. package/index.js +2 -2
  14. package/index.mjs +19 -0
  15. package/initMatchers.d.mts +5 -0
  16. package/{esm/initMatchers.js → initMatchers.mjs} +2 -2
  17. package/package.json +57 -27
  18. package/{esm/setupVitest.d.ts → setupVitest.d.mts} +2 -2
  19. package/setupVitest.js +11 -9
  20. package/{esm/setupVitest.js → setupVitest.mjs} +14 -12
  21. package/esm/index.d.ts +0 -11
  22. package/esm/index.js +0 -19
  23. package/esm/initMatchers.d.ts +0 -5
  24. package/esm/package.json +0 -1
  25. /package/{esm/chaiPlugin.d.ts → chaiPlugin.d.mts} +0 -0
  26. /package/{esm/chaiTypes.d.ts → chaiTypes.d.mts} +0 -0
  27. /package/{esm/chaiTypes.js → chaiTypes.mjs} +0 -0
  28. /package/{esm/components.d.ts → components.d.mts} +0 -0
  29. /package/{esm/components.js → components.mjs} +0 -0
  30. /package/{esm/configure.d.ts → configure.d.mts} +0 -0
  31. /package/{esm/configure.js → configure.mjs} +0 -0
  32. /package/{esm/createDescribe.d.ts → createDescribe.d.mts} +0 -0
  33. /package/{esm/createDescribe.js → createDescribe.mjs} +0 -0
  34. /package/{esm/env.d.ts → env.d.mts} +0 -0
  35. /package/{esm/env.js → env.mjs} +0 -0
  36. /package/{esm/flushMicrotasks.d.ts → flushMicrotasks.d.mts} +0 -0
  37. /package/{esm/focusVisible.d.ts → focusVisible.d.mts} +0 -0
  38. /package/{esm/ignoreActWarnings.d.ts → ignoreActWarnings.d.mts} +0 -0
  39. /package/{esm/ignoreActWarnings.js → ignoreActWarnings.mjs} +0 -0
  40. /package/{esm/initPlaywrightMatchers.d.ts → initPlaywrightMatchers.d.mts} +0 -0
  41. /package/{esm/initPlaywrightMatchers.js → initPlaywrightMatchers.mjs} +0 -0
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@mui/internal-test-utils",
3
- "version": "2.0.18-canary.2",
3
+ "version": "2.0.18-canary.20",
4
4
  "author": "MUI Team",
5
5
  "description": "Utilities for MUI tests. This is an internal package not meant for general use.",
6
+ "license": "MIT",
6
7
  "repository": {
7
8
  "type": "git",
8
9
  "url": "git+https://github.com/mui/mui-public.git",
@@ -10,18 +11,16 @@
10
11
  },
11
12
  "dependencies": {
12
13
  "@types/chai-dom": "^1.11.3",
13
- "@babel/runtime": "^7.28.4",
14
+ "@babel/runtime": "^7.29.2",
14
15
  "@testing-library/dom": "^10.4.1",
15
- "@testing-library/react": "^16.3.1",
16
+ "@testing-library/react": "^16.3.2",
16
17
  "@testing-library/user-event": "^14.6.1",
17
18
  "assertion-error": "^2.0.1",
18
19
  "chai-dom": "^1.12.1",
19
20
  "dom-accessibility-api": "^0.7.1",
20
- "es-toolkit": "^1.43.0",
21
+ "es-toolkit": "^1.45.1",
21
22
  "format-util": "^1.0.5",
22
- "jsdom": "^26.1.0",
23
23
  "prop-types": "^15.8.1",
24
- "sinon": "^21.0.1",
25
24
  "vitest-fail-on-console": "^0.10.1"
26
25
  },
27
26
  "peerDependencies": {
@@ -44,91 +43,122 @@
44
43
  "access": "public"
45
44
  },
46
45
  "type": "commonjs",
47
- "main": "./index.js",
48
- "types": "./index.d.ts",
49
46
  "exports": {
50
47
  "./package.json": "./package.json",
51
48
  ".": {
49
+ "import": {
50
+ "types": "./index.d.mts",
51
+ "default": "./index.mjs"
52
+ },
52
53
  "require": {
53
54
  "types": "./index.d.ts",
54
55
  "default": "./index.js"
55
56
  },
56
57
  "default": {
57
- "types": "./esm/index.d.ts",
58
- "default": "./esm/index.js"
58
+ "types": "./index.d.mts",
59
+ "default": "./index.mjs"
59
60
  }
60
61
  },
61
62
  "./createDescribe": {
63
+ "import": {
64
+ "types": "./createDescribe.d.mts",
65
+ "default": "./createDescribe.mjs"
66
+ },
62
67
  "require": {
63
68
  "types": "./createDescribe.d.ts",
64
69
  "default": "./createDescribe.js"
65
70
  },
66
71
  "default": {
67
- "types": "./esm/createDescribe.d.ts",
68
- "default": "./esm/createDescribe.js"
72
+ "types": "./createDescribe.d.mts",
73
+ "default": "./createDescribe.mjs"
69
74
  }
70
75
  },
71
76
  "./createRenderer": {
77
+ "import": {
78
+ "types": "./createRenderer.d.mts",
79
+ "default": "./createRenderer.mjs"
80
+ },
72
81
  "require": {
73
82
  "types": "./createRenderer.d.ts",
74
83
  "default": "./createRenderer.js"
75
84
  },
76
85
  "default": {
77
- "types": "./esm/createRenderer.d.ts",
78
- "default": "./esm/createRenderer.js"
86
+ "types": "./createRenderer.d.mts",
87
+ "default": "./createRenderer.mjs"
79
88
  }
80
89
  },
81
90
  "./initMatchers": {
91
+ "import": {
92
+ "types": "./initMatchers.d.mts",
93
+ "default": "./initMatchers.mjs"
94
+ },
82
95
  "require": {
83
96
  "types": "./initMatchers.d.ts",
84
97
  "default": "./initMatchers.js"
85
98
  },
86
99
  "default": {
87
- "types": "./esm/initMatchers.d.ts",
88
- "default": "./esm/initMatchers.js"
100
+ "types": "./initMatchers.d.mts",
101
+ "default": "./initMatchers.mjs"
89
102
  }
90
103
  },
91
104
  "./env": {
105
+ "import": {
106
+ "types": "./env.d.mts",
107
+ "default": "./env.mjs"
108
+ },
92
109
  "require": {
93
110
  "types": "./env.d.ts",
94
111
  "default": "./env.js"
95
112
  },
96
113
  "default": {
97
- "types": "./esm/env.d.ts",
98
- "default": "./esm/env.js"
114
+ "types": "./env.d.mts",
115
+ "default": "./env.mjs"
99
116
  }
100
117
  },
101
118
  "./initPlaywrightMatchers": {
119
+ "import": {
120
+ "types": "./initPlaywrightMatchers.d.mts",
121
+ "default": "./initPlaywrightMatchers.mjs"
122
+ },
102
123
  "require": {
103
124
  "types": "./initPlaywrightMatchers.d.ts",
104
125
  "default": "./initPlaywrightMatchers.js"
105
126
  },
106
127
  "default": {
107
- "types": "./esm/initPlaywrightMatchers.d.ts",
108
- "default": "./esm/initPlaywrightMatchers.js"
128
+ "types": "./initPlaywrightMatchers.d.mts",
129
+ "default": "./initPlaywrightMatchers.mjs"
109
130
  }
110
131
  },
111
132
  "./chaiPlugin": {
133
+ "import": {
134
+ "types": "./chaiPlugin.d.mts",
135
+ "default": "./chaiPlugin.mjs"
136
+ },
112
137
  "require": {
113
138
  "types": "./chaiPlugin.d.ts",
114
139
  "default": "./chaiPlugin.js"
115
140
  },
116
141
  "default": {
117
- "types": "./esm/chaiPlugin.d.ts",
118
- "default": "./esm/chaiPlugin.js"
142
+ "types": "./chaiPlugin.d.mts",
143
+ "default": "./chaiPlugin.mjs"
119
144
  }
120
145
  },
121
146
  "./setupVitest": {
147
+ "import": {
148
+ "types": "./setupVitest.d.mts",
149
+ "default": "./setupVitest.mjs"
150
+ },
122
151
  "require": {
123
152
  "types": "./setupVitest.d.ts",
124
153
  "default": "./setupVitest.js"
125
154
  },
126
155
  "default": {
127
- "types": "./esm/setupVitest.d.ts",
128
- "default": "./esm/setupVitest.js"
156
+ "types": "./setupVitest.d.mts",
157
+ "default": "./setupVitest.mjs"
129
158
  }
130
- },
131
- "./esm": null
159
+ }
132
160
  },
133
- "gitSha": "eff80195a0f1df6417dab4be0e3787e443b12851"
161
+ "main": "./index.js",
162
+ "types": "./index.d.ts",
163
+ "gitSha": "30b5a31fc2a81e2a983ef16793cb54e4864d98f2"
134
164
  }
@@ -1,5 +1,5 @@
1
- import "./chaiTypes.js";
2
- import { Configuration } from "./configure.js";
1
+ import "./chaiTypes.mjs";
2
+ import { Configuration } from "./configure.mjs";
3
3
  export default function setupVitest({
4
4
  failOnConsoleEnabled,
5
5
  ...config
package/setupVitest.js CHANGED
@@ -36,15 +36,6 @@ function setupVitest({
36
36
  _vitest.vi.useRealTimers();
37
37
  (0, _pure.cleanup)();
38
38
  });
39
- if (isInitialized) {
40
- return;
41
- }
42
- (0, _configure.configure)(config);
43
- isInitialized = true;
44
-
45
- // Don't call test lifecycle hooks after this point
46
-
47
- chai.use(_chaiPlugin.default);
48
39
  if (failOnConsoleEnabled) {
49
40
  (0, _vitestFailOnConsole.default)({
50
41
  silenceMessage: message => {
@@ -70,6 +61,17 @@ function setupVitest({
70
61
  }
71
62
  });
72
63
  }
64
+
65
+ // Don't call test lifecycle hooks (afterEach/afterAll/beforeEach/beforeAll/...) after this point
66
+ // Make sure none of (transitive) dependencies call lifecycle hooks either, otherwise they won't be
67
+ // registered and thus won't run when using `--no-isolate --no-file-parallelism`.
68
+
69
+ if (isInitialized) {
70
+ return;
71
+ }
72
+ isInitialized = true;
73
+ (0, _configure.configure)(config);
74
+ chai.use(_chaiPlugin.default);
73
75
  if (typeof window !== 'undefined') {
74
76
  chai.use(_chaiDom.default);
75
77
 
@@ -1,12 +1,12 @@
1
1
  import failOnConsole from 'vitest-fail-on-console';
2
2
  import * as chai from 'chai';
3
- import "./chaiTypes.js";
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.js";
9
- import { configure } from "./configure.js";
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,
@@ -27,15 +27,6 @@ export default function setupVitest({
27
27
  vi.useRealTimers();
28
28
  cleanup();
29
29
  });
30
- if (isInitialized) {
31
- return;
32
- }
33
- configure(config);
34
- isInitialized = true;
35
-
36
- // Don't call test lifecycle hooks after this point
37
-
38
- chai.use(chaiPlugin);
39
30
  if (failOnConsoleEnabled) {
40
31
  failOnConsole({
41
32
  silenceMessage: message => {
@@ -61,6 +52,17 @@ export default function setupVitest({
61
52
  }
62
53
  });
63
54
  }
55
+
56
+ // Don't call test lifecycle hooks (afterEach/afterAll/beforeEach/beforeAll/...) after this point
57
+ // Make sure none of (transitive) dependencies call lifecycle hooks either, otherwise they won't be
58
+ // registered and thus won't run when using `--no-isolate --no-file-parallelism`.
59
+
60
+ if (isInitialized) {
61
+ return;
62
+ }
63
+ isInitialized = true;
64
+ configure(config);
65
+ chai.use(chaiPlugin);
64
66
  if (typeof window !== 'undefined') {
65
67
  chai.use(chaiDom);
66
68
 
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/index.js DELETED
@@ -1,19 +0,0 @@
1
- /**
2
- * @mui/internal-test-utils v2.0.17
3
- *
4
- * @license undefined
5
- * This source code is licensed under the undefined license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- */
8
- import "./initMatchers.js";
9
- export * from "./components.js";
10
- export { default as describeConformance } from "./describeConformance.js";
11
- export * from "./describeConformance.js";
12
- export { default as createDescribe } from "./createDescribe.js";
13
- export * from "./createRenderer.js";
14
- export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.js";
15
- // eslint-disable-next-line import/extensions
16
- export { fireEvent as fireDiscreteEvent } from '@testing-library/react/pure.js';
17
- export { flushMicrotasks } from "./flushMicrotasks.js";
18
- export * from "./env.js";
19
- export { ignoreActWarnings } from "./ignoreActWarnings.js";
@@ -1,5 +0,0 @@
1
- import * as chai from 'chai';
2
- import chaiDom from 'chai-dom';
3
- import "./chaiTypes.js";
4
- import chaiPlugin from "./chaiPlugin.js";
5
- export { chai, chaiDom, chaiPlugin };
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
File without changes