blob: f70c338039649424f7fd34a28bc8975ba373980b [file]
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
load("@npm_bazel_labs//webpack:index.bzl", "webpack_bundle")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
webpack_bundle(
name = "bundle",
srcs = glob(["*.js"]),
entry_point = "index.js",
# The webpack label here is specific to local testing since
# there is no @bazel/labs npm package here. Users
# will always have this label point to their @foobar//@bazel/labs/bin:webpack
# target if they are not using the default @npm//@bazel/labs/bin:webpack
webpack = "@npm_bazel_labs//webpack:cli",
)
ts_library(
name = "test_lib",
srcs = glob(["*.spec.ts"]),
deps = ["@npm//@types"],
)
jasmine_node_test(
name = "test",
data = [":bundle"],
deps = [
":test_lib",
"@npm//jasmine",
],
)