Function shouldScheduleUpdate

  • Determines whether or not a heartbeat tick should be scheduled. This is generally only useful for testing environments where Shifty's continuous heartbeat mechanism causes test runner issues.

    If you are using Jest, it is recommended to put this in a global afterAll hook. If you don't already have a Jest setup file, follow the setup in this StackOverflow post, and then add this to it:

    import { shouldScheduleUpdate } from 'shifty'

    afterAll(() => {
    shouldScheduleUpdate(false)
    })

    See

    https://github.com/jeremyckahn/shifty/issues/156

    Parameters

    • doScheduleUpdate: boolean

    Returns void

Generated using TypeDoc