UNPKG

react-testing-library

Version:

Simple and complete React DOM testing utilities that encourage good testing practices.

10 lines (8 loc) 256 B
"use strict"; var _ = require(".."); jest.mock('react-dom/test-utils', () => ({})); test('act works even when there is no act from test utils', () => { const callback = jest.fn(); (0, _.act)(callback); expect(callback).toHaveBeenCalledTimes(1); });