• creates a new AftVitestTest 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 (ctx) => {
    await AftVitestTest(ctx, async (v: AftVitestTest) => {
    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 | TaskContext<Test<{}> | Custom<{}>>

      a ctx representing the current Vitest instance containing the Vitest.Task used to get the test description or a string description

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

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

    • Optional options: AftTestOptions

      an optional AftTestOptions object containing overrides to internal configuration and settings

    Returns Promise<AftVitestTest>

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

Generated using TypeDoc