KarmaAliases.

KarmaInit(ICakeContext, KarmaSettings) Method

Summary

Runs karma init with settings.
Assembly
Cake.Karma.dll
Namespace
Cake.Karma
Containing Type
KarmaAliases

Syntax

public static void KarmaInit(this ICakeContext context, KarmaSettings settings)

Examples

Define the configuration file

var settings =
        new KarmaSettings
        {
           ConfigFile = "karma.conf.js"
        };
    KarmaInit(settings);

Run locally by specifying the run mode

var settings =
        new KarmaSettings
        {
            RunMode = KarmaRunMode.Local,
            ConfigFile = "karma.conf.js"
        };
    KarmaInit(settings);

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings KarmaSettings The command settings.

Return Value

Type Description
void