Skip to main content
Version: 1.1.x

jasmine_test

rules_jasmine public API

Macros and Functions

jasmine_test

Runs jasmine under bazel test

Example usage (generated):

load("@aspect_rules_jasmine//jasmine:defs.bzl", "jasmine_test")

jasmine_test(
# A unique name for this target.
name = "",
# Label pointing to the linked node_modules target where jasmine is linked, e.g
node_modules = None,
)

name

Required.

A unique name for this target.

node_modules

Required.

Label pointing to the linked node_modules target where jasmine is linked, e.g. //:node_modules.

jasmine must be linked into the node_modules supplied. jasmine-reporters is also required by default when jasmine_reporters is True jasmine-core is required when using sharding.

jasmine_reporters

Optional. Default: True

Whether jasmine-reporters is present in the supplied node_modules tree.

When enabled, adds a custom reporter to output junit XML to the path where Bazel expects to find it.

config

Optional. Default: None

jasmine config file. See: https://jasmine.github.io/setup/nodejs.html#configuration

timeout

Optional. Default: None

standard attribute for tests. Defaults to "short" if both timeout and size are unspecified.

size

Optional. Default: None

standard attribute for tests

data

Optional. Default: []

Runtime dependencies that Jasmine should be able to read.

This should include all test files, configuration files & files under test.

kwargs

Optional.

Additional named parameters from js_test. See js_test docs