UNPKG

@ryusei/code

Version:

<div align="center"> <a href="https://code.ryuseijs.com"> <img alt="RyuseiCode" src="https://code.ryuseijs.com/images/svg/logo.svg" width="70"> </a>

16 lines (11 loc) 319 B
import { nextTick } from './nextTick'; describe( 'nextTick', () => { test( 'can call the function on the next tick.', () => { const func = jest.fn(); nextTick( func ); expect( func ).not.toHaveBeenCalled(); setTimeout( () => { expect( func ).toHaveBeenCalledTimes( 1 ); } ); } ); } );