Skip to content

Commit

Permalink
chore: clean up react-dom dep
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed May 28, 2021
1 parent d9867ce commit 7b33cca
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/utils/timeUtil.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
import { act } from 'react-dom/test-utils';

export function nextSlice(callback: () => void) {
if (process.env.NODE_ENV === 'test') {
Promise.resolve().then(() => {
act(() => {
callback();
});
});
} else {
/* istanbul ignore next */
Promise.resolve().then(callback);
}
/* istanbul ignore next */
Promise.resolve().then(callback);
}

0 comments on commit 7b33cca

Please sign in to comment.