| # Copyright 2019 The Bazel Authors. All rights reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| load("@build_bazel_rules_karma//:defs.bzl", "ts_web_test_suite") |
| load("@build_bazel_rules_typescript//:defs.bzl", "ts_library") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| exports_files(["tsconfig.json"]) |
| |
| ts_library( |
| name = "test_lib", |
| testonly = True, |
| srcs = glob(["*.spec.ts"]), |
| deps = [ |
| "@npm//@types/jasmine", |
| ], |
| ) |
| |
| # This is a test with failing test. This test is not directly run by CI. |
| # The sh_test below invokes this test and checks the source mapped lines in the |
| # stack trace. |
| ts_web_test_suite( |
| name = "karma_test", |
| browsers = [ |
| "@io_bazel_rules_webtesting//browsers:chromium-local", |
| ], |
| tags = ["manual"], # not run by CI |
| deps = [ |
| ":test_lib", |
| "//test_folder:test_lib", |
| ], |
| ) |
| |
| sh_test( |
| name = "test_sourcemap", |
| srcs = ["test_sourcemap.sh"], |
| data = [ |
| ":karma_test", |
| "@bazel_tools//tools/bash/runfiles", |
| ], |
| ) |