Function beforeEach

  • Run the supplied function before any child tests, and all of their children, and so on.

    The test about to run is an argument to the function. While its test method has not yet run, it is safe to call test methods on it, but note that this may potentially be confusing if for example you call t.plan() and this conflicts with the t.plan() called in the test method.

    Parameters

    Returns void