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

    ex:

    it('[C1234] example usage for AftTest', async function() {
    await aftMochaTest(this, async (v: AftMochaTest) => {
    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

    • context: string | Context

      a this representing the current Mocha.Context containing the Mocha.Test used to get the test description or a string description

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

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

    • Optional options: AftTestOptions

      an optional AftTestOptions object containing overrides to internal configuration and settings

    Returns Promise<AftMochaTest>

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

Generated using TypeDoc