• creates a new AftJestTest instace to be used for executing some Functional Test Assertion and calls the run function to execute the testFunction.

    ex:

    test('[C1234] example usage for AftTest', () => {
    await aftJestTest(expect, async (v: AftJestTest) => {
    await v.reporter.info('doing some testing...');
    const feature = new FeatureObj();
    await v.verify(() => feature.returnExpectedValueAsync(), equaling('expected value'));
    }); // if PolicyManager.shouldRun('C1234') returns `false` the assertion is not run
    })

    Parameters

    • expect: string | JestExpect | Expect

      a JestExpect or jest.Expect containing a fullName property used as the test description or a string description

    • testFunction: Func<AftJestTest, void | PromiseLike<void>>

      the Func<AftJestTest, void | PromiseLike<void>> function to be executed by this AftJestTest

    • Optional options: AftTestOptions

      an optional AftTestOptions object containing overrides to internal configuration and settings

    Returns Promise<AftJestTest>

    an async Promise<void> that runs the passed in testFunction

Generated using TypeDoc