Sign up (with export icon)

utils/spy

Api-module icon module

Functions

  • Chevron-right icon

    spy() → () => void

    Creates a spy function (ala Sinon.js) that can be used to inspect call to it.

    The following are the present features:

    • spy.called: property set to true if the function has been called at least once.

    Returns

    () => void

    The spy function.