blob: f125b725032a3ff905ab31a2cb34819816f1c057 [file] [log] [blame]
load("@npm_deps//@bazel/protractor:index.bzl", "protractor_web_test_suite")
load("@npm_deps//http-server:index.bzl", "http_server")
load("@npm_deps//mocha:index.bzl", "mocha_test")
load(":differential_loading.bzl", "differential_loading")
differential_loading(
name = "app",
srcs = glob(["*.ts"]),
entry_point = "index.ts",
)
http_server(
name = "server",
data = [":app"],
templated_args = ["app"],
)
protractor_web_test_suite(
name = "server_test",
srcs = ["app.spec.js"],
on_prepare = ":protractor.on-prepare.js",
server = ":server",
)
mocha_test(
name = "test_sourcemaps",
# if we were in a subdirectory we'd need
# package_name() + "/*.spec.js"
args = ["*.spec.js"],
data = [
"sourcemaps.spec.js",
":app_chunks",
":app_chunks.min",
":app_chunks_es5",
":app_chunks_es5.min",
"@npm_deps//source-map",
],
tags = [
# Need to set the pwd to avoid mocha needing a runfiles helper
"no-bazelci-windows",
],
)
# Just a dummy test so that we have a test target for //... on certain bazelci platforms with bazel_integration_test
sh_test(
name = "dummy_test",
srcs = ["dummy_test.sh"],
)