@mui/internal-test-utils 2.0.18-canary.10 → 2.0.18-canary.12
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/package.json +2 -2
- package/setupVitest.js +11 -9
- package/setupVitest.mjs +11 -9
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.12",
|
|
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": {
|
|
@@ -160,5 +160,5 @@
|
|
|
160
160
|
},
|
|
161
161
|
"main": "./index.js",
|
|
162
162
|
"types": "./index.d.ts",
|
|
163
|
-
"gitSha": "
|
|
163
|
+
"gitSha": "b172a15e6b44720b15353ba8b15816cbbf5674e8"
|
|
164
164
|
}
|
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
|
|
package/setupVitest.mjs
CHANGED
|
@@ -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
|
|