Creates an action that can run karma.

This is also used by ts_web_test_rule.

Returns: The runfiles for the generated action.

Attributes

Runs unit tests in a browser with Karma.

When executed under bazel test, this uses a headless browser for speed. This is also because bazel test allows multiple targets to be tested together, and we don't want to open a Chrome window on your machine for each one. Also, under bazel test the test will execute and immediately terminate.

Running under ibazel test gives you a “watch mode” for your tests. The rule is optimized for this case - the test runner server will stay running and just re-serve the up-to-date JavaScript source bundle.

To debug a single test target, run it with bazel run instead. This will open a browser window on your computer. Also you can use any other browser by opening the URL printed when the test starts up. The test will remain running until you cancel the bazel run command.

This rule will use your system Chrome by default. In the default case, your environment must specify CHROME_BIN so that the rule will know which Chrome binary to run. Other browsers and customLaunchers may be set using the a base Karma configuration specified in the config_file attribute.

Attributes

Defines a test_suite of web_test targets that wrap a karma_web_test target.

This macro also accepts all parameters in karma_web_test. See karma_web_test docs for details.

Attributes