Skip to main content

externaldefault

Callable

  • default(config?: SerenityReporterForJasmineConfig, jasmine?: any): SerenityReporterForJasmine

  • Bootstraps the Serenity/JS reporter for Jasmine.

    This function monkey-patches Jasmine's Suite and Spec constructors so that they provide more accurate location information.

    For Jasmine 5.x, Suite and Spec are on the jasmine object directly. For Jasmine 6.x, Suite and Spec are in jasmine.private.

    Registering the reporter from the command line

    jasmine --reporter=@serenity-js/jasmine

    Registering the reporter programmatically

    import serenityReporterForJasmine = require('@serenity-js/jasmine');

    jasmine.getEnv().addReporter(serenityReporterForJasmine);

    Parameters

    • externalconfig: SerenityReporterForJasmineConfig = {}
    • externaljasmine: any = ...

      the global.jasmine instance

    Returns SerenityReporterForJasmine