File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import {prettyDOM} from './pretty-dom'
4
4
type Callback < T > = ( ) => T
5
5
interface InternalConfig extends Config {
6
6
_disableExpensiveErrorDiagnostics : boolean
7
- advanceTimersWrapper ( cb : ( ...args : unknown [ ] ) => unknown ) : unknown
8
7
}
9
8
10
9
// It would be cleaner for this to live inside './queries', but
@@ -21,7 +20,7 @@ let config: InternalConfig = {
21
20
// react-testing-library to use. For that reason, this feature will remain
22
21
// undocumented.
23
22
asyncWrapper : cb => cb ( ) ,
24
- advanceTimersWrapper : cb => cb ( ) ,
23
+ unstable_advanceTimersWrapper : cb => cb ( ) ,
25
24
eventWrapper : cb => cb ( ) ,
26
25
// default value for the `hidden` option in `ByRole` queries
27
26
defaultHidden : false ,
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ function waitFor(
64
64
65
65
const wasUsingJestFakeTimers = jestFakeTimersAreEnabled ( )
66
66
if ( wasUsingJestFakeTimers ) {
67
- const { advanceTimersWrapper} = getConfig ( )
67
+ const { unstable_advanceTimersWrapper : advanceTimersWrapper } = getConfig ( )
68
68
69
69
// this is a dangerous rule to disable because it could lead to an
70
70
// infinite loop. However, eslint isn't smart enough to know that we're
Original file line number Diff line number Diff line change 1
1
export interface Config {
2
2
testIdAttribute : string
3
+ /**
4
+ * WARNING: `unstable` prefix means this API may change in patch and minor releases.
5
+ * @param cb
6
+ */
7
+ unstable_advanceTimersWrapper ( cb : ( ...args : unknown [ ] ) => unknown ) : unknown
3
8
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4
9
asyncWrapper ( cb : ( ...args : any [ ] ) => any ) : Promise < any >
5
10
// eslint-disable-next-line @typescript-eslint/no-explicit-any
You can’t perform that action at this time.
0 commit comments