MCPcopy Create free account
hub / github.com/react-component/select / waitFakeTimer

Function waitFakeTimer

tests/utils/common.ts:127–137  ·  view source on GitHub ↗
(advanceTime = 1000, times = 20)

Source from the content-addressed store, hash-verified

125 * @param times Default 20
126 */
127export async function waitFakeTimer(advanceTime = 1000, times = 20) {
128 for (let i = 0; i < times; i += 1) {
129 await act(async () => {
130 await Promise.resolve();
131
132 if (advanceTime > 0) {
133 jest.advanceTimersByTime(advanceTime);
134 }
135 });
136 }
137}

Callers 1

Select.test.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…