@mui/internal-test-utils 2.0.18-canary.0 → 2.0.18-canary.10

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 (40) hide show
  1. package/{esm/chaiPlugin.js → chaiPlugin.mjs} +1 -1
  2. package/{esm/createRenderer.d.ts → createRenderer.d.mts} +68 -59
  3. package/createRenderer.d.ts +67 -58
  4. package/createRenderer.js +21 -4
  5. package/{esm/createRenderer.js → createRenderer.mjs} +24 -7
  6. package/{esm/describeConformance.d.ts → describeConformance.d.mts} +2 -2
  7. package/{esm/describeConformance.js → describeConformance.mjs} +2 -2
  8. package/{esm/flushMicrotasks.js → flushMicrotasks.mjs} +1 -1
  9. package/{esm/focusVisible.js → focusVisible.mjs} +1 -1
  10. package/ignoreActWarnings.d.mts +1 -0
  11. package/ignoreActWarnings.d.ts +1 -0
  12. package/ignoreActWarnings.js +21 -0
  13. package/ignoreActWarnings.mjs +15 -0
  14. package/index.d.mts +11 -0
  15. package/index.d.ts +2 -1
  16. package/index.js +10 -2
  17. package/{esm/index.js → index.mjs} +10 -9
  18. package/initMatchers.d.mts +5 -0
  19. package/{esm/initMatchers.js → initMatchers.mjs} +2 -2
  20. package/package.json +58 -28
  21. package/{esm/setupVitest.d.ts → setupVitest.d.mts} +2 -2
  22. package/{esm/setupVitest.js → setupVitest.mjs} +3 -3
  23. package/esm/index.d.ts +0 -10
  24. package/esm/initMatchers.d.ts +0 -5
  25. package/esm/package.json +0 -1
  26. /package/{esm/chaiPlugin.d.ts → chaiPlugin.d.mts} +0 -0
  27. /package/{esm/chaiTypes.d.ts → chaiTypes.d.mts} +0 -0
  28. /package/{esm/chaiTypes.js → chaiTypes.mjs} +0 -0
  29. /package/{esm/components.d.ts → components.d.mts} +0 -0
  30. /package/{esm/components.js → components.mjs} +0 -0
  31. /package/{esm/configure.d.ts → configure.d.mts} +0 -0
  32. /package/{esm/configure.js → configure.mjs} +0 -0
  33. /package/{esm/createDescribe.d.ts → createDescribe.d.mts} +0 -0
  34. /package/{esm/createDescribe.js → createDescribe.mjs} +0 -0
  35. /package/{esm/env.d.ts → env.d.mts} +0 -0
  36. /package/{esm/env.js → env.mjs} +0 -0
  37. /package/{esm/flushMicrotasks.d.ts → flushMicrotasks.d.mts} +0 -0
  38. /package/{esm/focusVisible.d.ts → focusVisible.d.mts} +0 -0
  39. /package/{esm/initPlaywrightMatchers.d.ts → initPlaywrightMatchers.d.mts} +0 -0
  40. /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.js";
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) {
@@ -1,8 +1,8 @@
1
- import { queries, RenderResult, fireEvent as rtlFireEvent, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
1
+ import { queries, RenderResult, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
2
2
  import { userEvent } from '@testing-library/user-event';
3
3
  import * as React from 'react';
4
- import { useFakeTimers } from 'sinon';
5
- import { flushMicrotasks } from "./flushMicrotasks.js";
4
+ import { vi } from 'vitest';
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]>;
@@ -41,6 +41,10 @@ export interface MuiRenderResult extends RenderResult<typeof queries & typeof cu
41
41
  * convenience helper. Better than repeating all props.
42
42
  */
43
43
  setProps(props: object): void;
44
+ /**
45
+ * convenience helper. Better than repeating all props.
46
+ */
47
+ setPropsAsync(props: object): Promise<void>;
44
48
  }
45
49
  export interface MuiRenderToStringResult {
46
50
  container: HTMLElement;
@@ -65,6 +69,11 @@ export interface Clock {
65
69
  * @param timeoutMS
66
70
  */
67
71
  tick(timeoutMS: number): void;
72
+ /**
73
+ * Tick the clock ahead `timeoutMS` milliseconds. And also flush any microtasks queued in between.
74
+ * @param timeoutMS
75
+ */
76
+ tickAsync(timeoutMS: number): Promise<void>;
68
77
  /**
69
78
  * Returns true if we're running with "real" i.e. native timers.
70
79
  */
@@ -79,7 +88,7 @@ export interface Clock {
79
88
  restore(): void;
80
89
  }
81
90
  export type ClockConfig = undefined | number | Date;
82
- declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof useFakeTimers>[0], number | Date>): Clock;
91
+ declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof vi.useFakeTimers>[0], number | Date>): Clock;
83
92
  export interface Renderer {
84
93
  clock: Clock;
85
94
  render(element: React.ReactElement<DataAttributes>, options?: RenderOptions): MuiRenderResult;
@@ -95,68 +104,62 @@ export interface CreateRendererOptions extends Pick<RenderOptions, 'strict' | 's
95
104
  emotion?: boolean;
96
105
  }
97
106
  export declare function createRenderer(globalOptions?: CreateRendererOptions): Renderer;
98
- declare const fireEvent: typeof rtlFireEvent;
107
+ declare const fireEvent: import("@testing-library/dom").FireFunction & import("@testing-library/dom").FireObject;
99
108
  export declare function fireTouchChangedEvent(target: Element, type: 'touchstart' | 'touchmove' | 'touchend', options: {
100
109
  changedTouches: Array<Pick<TouchInit, 'clientX' | 'clientY'>>;
101
110
  }): void;
102
111
  declare function act<T>(callback: () => T | Promise<T>): Promise<T>;
103
112
  declare function act(callback: () => void): void;
104
113
  declare const bodyBoundQueries: {
105
- getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.GetByText<T>>;
106
- getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
107
- queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.QueryByText<T>>;
108
- queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
109
- findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByText<T>>;
110
- findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByText<T>>;
111
- getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
112
- getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
113
- queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
114
- queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
115
- findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
116
- findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
117
- getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.GetByText<T>>;
118
- getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
119
- queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.QueryByText<T>>;
120
- queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
121
- findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByText<T>>;
122
- findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByText<T>>;
123
- getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
124
- getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
125
- queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
126
- queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
127
- findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
128
- findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
129
- getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
130
- getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
131
- queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
132
- queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
133
- findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
134
- findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
135
- getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
136
- getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
137
- queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
138
- queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
139
- findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
140
- findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
141
- getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.GetByRole<T>>;
142
- getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.AllByRole<T>>;
143
- queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.QueryByRole<T>>;
144
- queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.AllByRole<T>>;
145
- findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByRole<T>>;
146
- findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByRole<T>>;
147
- getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
148
- getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
149
- queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
150
- queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
151
- findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
152
- findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
114
+ getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
115
+ getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
116
+ queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
117
+ queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
118
+ findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
119
+ findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
120
+ getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
121
+ getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
122
+ queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
123
+ queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
124
+ findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
125
+ findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
126
+ getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
127
+ getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
128
+ queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
129
+ queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
130
+ findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
131
+ findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
132
+ getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
133
+ getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
134
+ queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
135
+ queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
136
+ findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
137
+ findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
138
+ getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
139
+ getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
140
+ queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
141
+ queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
142
+ findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
143
+ findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
144
+ getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
145
+ getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
146
+ queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
147
+ queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
148
+ findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
149
+ findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
150
+ getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T;
151
+ getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
152
+ queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T | null;
153
+ queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
154
+ findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
155
+ findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
156
+ getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
157
+ getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
158
+ queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
159
+ queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
160
+ findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
161
+ findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
153
162
  } & {
154
- queryDescriptionOf: (args_0: Element) => HTMLElement | null;
155
- queryAllDescriptionsOf: (element: Element) => HTMLElement[];
156
- getDescriptionOf: (args_0: Element) => HTMLElement;
157
- getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
158
- findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
159
- findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
160
163
  getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
161
164
  getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
162
165
  queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
@@ -205,6 +208,12 @@ declare const bodyBoundQueries: {
205
208
  queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
206
209
  findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
207
210
  findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
211
+ queryDescriptionOf: (args_0: Element) => HTMLElement | null;
212
+ queryAllDescriptionsOf: (element: Element) => HTMLElement[];
213
+ getDescriptionOf: (args_0: Element) => HTMLElement;
214
+ getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
215
+ findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
216
+ findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
208
217
  };
209
218
  export { configure, render, renderHook, waitFor, within, cleanup, createEvent, type RenderHookResult, type EventType } from '@testing-library/react/pure.js';
210
219
  export { act, fireEvent };
@@ -1,7 +1,7 @@
1
- import { queries, RenderResult, fireEvent as rtlFireEvent, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
1
+ import { queries, RenderResult, Screen, RenderOptions as TestingLibraryRenderOptions } from '@testing-library/react/pure.js';
2
2
  import { userEvent } from '@testing-library/user-event';
3
3
  import * as React from 'react';
4
- import { useFakeTimers } from 'sinon';
4
+ import { vi } from 'vitest';
5
5
  import { flushMicrotasks } from "./flushMicrotasks.js";
6
6
  declare function queryAllDescriptionsOf(baseElement: HTMLElement, element: Element): HTMLElement[];
7
7
  declare const customQueries: {
@@ -41,6 +41,10 @@ export interface MuiRenderResult extends RenderResult<typeof queries & typeof cu
41
41
  * convenience helper. Better than repeating all props.
42
42
  */
43
43
  setProps(props: object): void;
44
+ /**
45
+ * convenience helper. Better than repeating all props.
46
+ */
47
+ setPropsAsync(props: object): Promise<void>;
44
48
  }
45
49
  export interface MuiRenderToStringResult {
46
50
  container: HTMLElement;
@@ -65,6 +69,11 @@ export interface Clock {
65
69
  * @param timeoutMS
66
70
  */
67
71
  tick(timeoutMS: number): void;
72
+ /**
73
+ * Tick the clock ahead `timeoutMS` milliseconds. And also flush any microtasks queued in between.
74
+ * @param timeoutMS
75
+ */
76
+ tickAsync(timeoutMS: number): Promise<void>;
68
77
  /**
69
78
  * Returns true if we're running with "real" i.e. native timers.
70
79
  */
@@ -79,7 +88,7 @@ export interface Clock {
79
88
  restore(): void;
80
89
  }
81
90
  export type ClockConfig = undefined | number | Date;
82
- declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof useFakeTimers>[0], number | Date>): Clock;
91
+ declare function createClock(defaultMode: 'fake' | 'real', config: ClockConfig, options: Exclude<Parameters<typeof vi.useFakeTimers>[0], number | Date>): Clock;
83
92
  export interface Renderer {
84
93
  clock: Clock;
85
94
  render(element: React.ReactElement<DataAttributes>, options?: RenderOptions): MuiRenderResult;
@@ -95,68 +104,62 @@ export interface CreateRendererOptions extends Pick<RenderOptions, 'strict' | 's
95
104
  emotion?: boolean;
96
105
  }
97
106
  export declare function createRenderer(globalOptions?: CreateRendererOptions): Renderer;
98
- declare const fireEvent: typeof rtlFireEvent;
107
+ declare const fireEvent: import("@testing-library/dom").FireFunction & import("@testing-library/dom").FireObject;
99
108
  export declare function fireTouchChangedEvent(target: Element, type: 'touchstart' | 'touchmove' | 'touchend', options: {
100
109
  changedTouches: Array<Pick<TouchInit, 'clientX' | 'clientY'>>;
101
110
  }): void;
102
111
  declare function act<T>(callback: () => T | Promise<T>): Promise<T>;
103
112
  declare function act(callback: () => void): void;
104
113
  declare const bodyBoundQueries: {
105
- getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.GetByText<T>>;
106
- getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
107
- queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.QueryByText<T>>;
108
- queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
109
- findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByText<T>>;
110
- findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByText<T>>;
111
- getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
112
- getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
113
- queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
114
- queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
115
- findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
116
- findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
117
- getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.GetByText<T>>;
118
- getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
119
- queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.QueryByText<T>>;
120
- queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): ReturnType<queries.AllByText<T>>;
121
- findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByText<T>>;
122
- findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByText<T>>;
123
- getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
124
- getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
125
- queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
126
- queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
127
- findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
128
- findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
129
- getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
130
- getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
131
- queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
132
- queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
133
- findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
134
- findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
135
- getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
136
- getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
137
- queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
138
- queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
139
- findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
140
- findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
141
- getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.GetByRole<T>>;
142
- getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.AllByRole<T>>;
143
- queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.QueryByRole<T>>;
144
- queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): ReturnType<queries.AllByRole<T>>;
145
- findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByRole<T>>;
146
- findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByRole<T>>;
147
- getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.GetByBoundAttribute<T>>;
148
- getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
149
- queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.QueryByBoundAttribute<T>>;
150
- queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): ReturnType<queries.AllByBoundAttribute<T>>;
151
- findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindByBoundAttribute<T>>;
152
- findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): ReturnType<queries.FindAllByBoundAttribute<T>>;
114
+ getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
115
+ getAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
116
+ queryByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
117
+ queryAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
118
+ findByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
119
+ findAllByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
120
+ getByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
121
+ getAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
122
+ queryByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
123
+ queryAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
124
+ findByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
125
+ findAllByPlaceholderText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
126
+ getByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
127
+ getAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
128
+ queryByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T | null;
129
+ queryAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T[];
130
+ findByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
131
+ findAllByText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
132
+ getByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
133
+ getAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
134
+ queryByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
135
+ queryAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
136
+ findByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
137
+ findAllByAltText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
138
+ getByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
139
+ getAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
140
+ queryByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
141
+ queryAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
142
+ findByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
143
+ findAllByTitle<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
144
+ getByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
145
+ getAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
146
+ queryByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
147
+ queryAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
148
+ findByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
149
+ findAllByDisplayValue<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
150
+ getByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T;
151
+ getAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
152
+ queryByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T | null;
153
+ queryAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined): T[];
154
+ findByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
155
+ findAllByRole<T extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: queries.ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
156
+ getByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T;
157
+ getAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
158
+ queryByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T | null;
159
+ queryAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T[];
160
+ findByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T>;
161
+ findAllByTestId<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T[]>;
153
162
  } & {
154
- queryDescriptionOf: (args_0: Element) => HTMLElement | null;
155
- queryAllDescriptionsOf: (element: Element) => HTMLElement[];
156
- getDescriptionOf: (args_0: Element) => HTMLElement;
157
- getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
158
- findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
159
- findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
160
163
  getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
161
164
  getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
162
165
  queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
@@ -205,6 +208,12 @@ declare const bodyBoundQueries: {
205
208
  queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
206
209
  findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
207
210
  findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
211
+ queryDescriptionOf: (args_0: Element) => HTMLElement | null;
212
+ queryAllDescriptionsOf: (element: Element) => HTMLElement[];
213
+ getDescriptionOf: (args_0: Element) => HTMLElement;
214
+ getAllDescriptionsOf: (args_0: Element) => HTMLElement[];
215
+ findDescriptionOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
216
+ findAllDescriptionsOf: (args_0: Element, args_1?: undefined, args_2?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
208
217
  };
209
218
  export { configure, render, renderHook, waitFor, within, cleanup, createEvent, type RenderHookResult, type EventType } from '@testing-library/react/pure.js';
210
219
  export { act, fireEvent };
package/createRenderer.js CHANGED
@@ -117,6 +117,11 @@ function render(element, configuration) {
117
117
  },
118
118
  setProps(props) {
119
119
  testingLibraryRenderResult.rerender(/*#__PURE__*/React.cloneElement(element, props));
120
+ },
121
+ async setPropsAsync(props) {
122
+ await (0, _pure.act)(async () => {
123
+ testingLibraryRenderResult.rerender(/*#__PURE__*/React.cloneElement(element, props));
124
+ });
120
125
  }
121
126
  };
122
127
  return result;
@@ -198,6 +203,11 @@ function createClock(defaultMode, config, options) {
198
203
  _vitest.vi.advanceTimersByTime(timeoutMS);
199
204
  });
200
205
  },
206
+ async tickAsync(timeoutMS) {
207
+ await (0, _pure.act)(async () => {
208
+ await _vitest.vi.advanceTimersByTimeAsync(timeoutMS);
209
+ });
210
+ },
201
211
  runAll() {
202
212
  (0, _pure.act)(() => {
203
213
  _vitest.vi.runAllTimers();
@@ -411,10 +421,17 @@ function fireTouchChangedEvent(target, type, options) {
411
421
  function act(callback) {
412
422
  return (0, _pure.act)(callback);
413
423
  }
414
- const bodyBoundQueries = (0, _pure.within)(document.body, {
415
- ..._pure.queries,
416
- ...customQueries
417
- });
424
+ function createBodyBoundQueries() {
425
+ return (0, _pure.within)(document.body, {
426
+ ..._pure.queries,
427
+ ...customQueries
428
+ });
429
+ }
430
+ const bodyBoundQueries = typeof document === 'undefined' ? new Proxy({}, {
431
+ get: () => {
432
+ throw new Error('bodyBoundQueries is not available in a non-DOM environment');
433
+ }
434
+ }) : createBodyBoundQueries();
418
435
  const screen = exports.screen = {
419
436
  ..._pure.screen,
420
437
  ...bodyBoundQueries
@@ -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.js";
9
- import { flushMicrotasks } from "./flushMicrotasks.js";
10
- import { config as utilsConfig } from "./configure.js";
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');
@@ -62,6 +62,11 @@ function render(element, configuration) {
62
62
  },
63
63
  setProps(props) {
64
64
  testingLibraryRenderResult.rerender(/*#__PURE__*/React.cloneElement(element, props));
65
+ },
66
+ async setPropsAsync(props) {
67
+ await rtlAct(async () => {
68
+ testingLibraryRenderResult.rerender(/*#__PURE__*/React.cloneElement(element, props));
69
+ });
65
70
  }
66
71
  };
67
72
  return result;
@@ -143,6 +148,11 @@ function createClock(defaultMode, config, options) {
143
148
  vi.advanceTimersByTime(timeoutMS);
144
149
  });
145
150
  },
151
+ async tickAsync(timeoutMS) {
152
+ await rtlAct(async () => {
153
+ await vi.advanceTimersByTimeAsync(timeoutMS);
154
+ });
155
+ },
146
156
  runAll() {
147
157
  rtlAct(() => {
148
158
  vi.runAllTimers();
@@ -355,10 +365,17 @@ export function fireTouchChangedEvent(target, type, options) {
355
365
  function act(callback) {
356
366
  return rtlAct(callback);
357
367
  }
358
- const bodyBoundQueries = within(document.body, {
359
- ...queries,
360
- ...customQueries
361
- });
368
+ function createBodyBoundQueries() {
369
+ return within(document.body, {
370
+ ...queries,
371
+ ...customQueries
372
+ });
373
+ }
374
+ const bodyBoundQueries = typeof document === 'undefined' ? new Proxy({}, {
375
+ get: () => {
376
+ throw new Error('bodyBoundQueries is not available in a non-DOM environment');
377
+ }
378
+ }) : createBodyBoundQueries();
362
379
  export { configure, render, renderHook, waitFor, within, cleanup, createEvent
363
380
 
364
381
  // eslint-disable-next-line import/extensions
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { MuiRenderResult } from "./createRenderer.js";
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.js").MUIDescribe<[minimalElement: React.ReactElement<any, string | React.JSXElementConstructor<any>>, getOptions: () => ConformanceOptions]>;
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.js";
5
- import { isJsdom } from "./env.js";
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);
@@ -1,4 +1,4 @@
1
- import { act } from "./createRenderer.js";
1
+ import { act } from "./createRenderer.mjs";
2
2
  export async function flushMicrotasks() {
3
3
  await act(async () => {});
4
4
  }
@@ -1,4 +1,4 @@
1
- import { act, fireEvent } from "./createRenderer.js";
1
+ import { act, fireEvent } from "./createRenderer.mjs";
2
2
  export default function focusVisible(element) {
3
3
  act(() => {
4
4
  element.blur();
@@ -0,0 +1 @@
1
+ export declare function ignoreActWarnings(): void;
@@ -0,0 +1 @@
1
+ export declare function ignoreActWarnings(): void;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ignoreActWarnings = ignoreActWarnings;
7
+ var _vitest = require("vitest");
8
+ function ignoreActWarnings() {
9
+ const originalConsoleError = console.error;
10
+ console.error = new Proxy(console.error, {
11
+ apply(target, thisArg, args) {
12
+ if (typeof args[0] === 'string' && args[0].includes('An update to %s inside a test was not wrapped in act')) {
13
+ return;
14
+ }
15
+ Reflect.apply(target, thisArg, args);
16
+ }
17
+ });
18
+ (0, _vitest.onTestFinished)(() => {
19
+ console.error = originalConsoleError;
20
+ });
21
+ }
@@ -0,0 +1,15 @@
1
+ import { onTestFinished } from 'vitest';
2
+ export function ignoreActWarnings() {
3
+ const originalConsoleError = console.error;
4
+ console.error = new Proxy(console.error, {
5
+ apply(target, thisArg, args) {
6
+ if (typeof args[0] === 'string' && args[0].includes('An update to %s inside a test was not wrapped in act')) {
7
+ return;
8
+ }
9
+ Reflect.apply(target, thisArg, args);
10
+ }
11
+ });
12
+ onTestFinished(() => {
13
+ console.error = originalConsoleError;
14
+ });
15
+ }
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";
package/index.d.ts CHANGED
@@ -7,4 +7,5 @@ export * from "./createRenderer.js";
7
7
  export { default as focusVisible, simulatePointerDevice, simulateKeyboardDevice, programmaticFocusTriggersFocusVisible } from "./focusVisible.js";
8
8
  export { fireEvent as fireDiscreteEvent } from '@testing-library/react/pure.js';
9
9
  export { flushMicrotasks } from "./flushMicrotasks.js";
10
- export * from "./env.js";
10
+ export * from "./env.js";
11
+ export { ignoreActWarnings } from "./ignoreActWarnings.js";
package/index.js CHANGED
@@ -20,7 +20,8 @@ var _exportNames = {
20
20
  simulateKeyboardDevice: true,
21
21
  programmaticFocusTriggersFocusVisible: true,
22
22
  fireDiscreteEvent: true,
23
- flushMicrotasks: true
23
+ flushMicrotasks: true,
24
+ ignoreActWarnings: true
24
25
  };
25
26
  Object.defineProperty(exports, "createDescribe", {
26
27
  enumerable: true,
@@ -52,6 +53,12 @@ Object.defineProperty(exports, "focusVisible", {
52
53
  return _focusVisible.default;
53
54
  }
54
55
  });
56
+ Object.defineProperty(exports, "ignoreActWarnings", {
57
+ enumerable: true,
58
+ get: function () {
59
+ return _ignoreActWarnings.ignoreActWarnings;
60
+ }
61
+ });
55
62
  Object.defineProperty(exports, "programmaticFocusTriggersFocusVisible", {
56
63
  enumerable: true,
57
64
  get: function () {
@@ -122,4 +129,5 @@ Object.keys(_env).forEach(function (key) {
122
129
  return _env[key];
123
130
  }
124
131
  });
125
- });
132
+ });
133
+ var _ignoreActWarnings = require("./ignoreActWarnings");
@@ -5,14 +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.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";
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.js";
18
- export * from "./env.js";
17
+ export { flushMicrotasks } from "./flushMicrotasks.mjs";
18
+ export * from "./env.mjs";
19
+ export { ignoreActWarnings } from "./ignoreActWarnings.mjs";
@@ -0,0 +1,5 @@
1
+ import * as chai from 'chai';
2
+ import chaiDom from 'chai-dom';
3
+ import "./chaiTypes.mjs";
4
+ import chaiPlugin from "./chaiPlugin.mjs";
5
+ export { chai, chaiDom, chaiPlugin };
@@ -1,7 +1,7 @@
1
1
  import * as chai from 'chai';
2
2
  import chaiDom from 'chai-dom';
3
- import "./chaiTypes.js";
4
- import chaiPlugin from "./chaiPlugin.js";
3
+ import "./chaiTypes.mjs";
4
+ import chaiPlugin from "./chaiPlugin.mjs";
5
5
  chai.use(chaiDom);
6
6
  chai.use(chaiPlugin);
7
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-test-utils",
3
- "version": "2.0.18-canary.0",
3
+ "version": "2.0.18-canary.10",
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": {
@@ -10,18 +10,17 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@types/chai-dom": "^1.11.3",
13
- "@babel/runtime": "^7.28.4",
13
+ "@babel/runtime": "^7.28.6",
14
14
  "@testing-library/dom": "^10.4.1",
15
- "@testing-library/react": "^16.3.0",
15
+ "@testing-library/react": "^16.3.2",
16
16
  "@testing-library/user-event": "^14.6.1",
17
17
  "assertion-error": "^2.0.1",
18
18
  "chai-dom": "^1.12.1",
19
- "dom-accessibility-api": "^0.7.0",
20
- "es-toolkit": "^1.41.0",
19
+ "dom-accessibility-api": "^0.7.1",
20
+ "es-toolkit": "^1.44.0",
21
21
  "format-util": "^1.0.5",
22
- "jsdom": "^26.1.0",
22
+ "jsdom": "^27.4.0",
23
23
  "prop-types": "^15.8.1",
24
- "sinon": "^21.0.0",
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": "6b3d5d685430c855b51214a5a6d756d3207380eb"
161
+ "main": "./index.js",
162
+ "types": "./index.d.ts",
163
+ "gitSha": "f61e4196fc518b29dfdb30a852fcdb29b26b67b4"
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
@@ -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,
package/esm/index.d.ts DELETED
@@ -1,10 +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";
@@ -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