Skip to content

Commit 7b33cca

Browse files
committed
chore: clean up react-dom dep
1 parent d9867ce commit 7b33cca

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/utils/timeUtil.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
import { act } from 'react-dom/test-utils';
2-
31
export function nextSlice(callback: () => void) {
4-
if (process.env.NODE_ENV === 'test') {
5-
Promise.resolve().then(() => {
6-
act(() => {
7-
callback();
8-
});
9-
});
10-
} else {
11-
/* istanbul ignore next */
12-
Promise.resolve().then(callback);
13-
}
2+
/* istanbul ignore next */
3+
Promise.resolve().then(callback);
144
}

0 commit comments

Comments
 (0)