| # 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("@npm_bazel_karma//:index.bzl", "ts_web_test_suite") |
| load("@npm_bazel_typescript//:index.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", |
| "@io_bazel_rules_webtesting//browsers:firefox-local", |
| ], |
| tags = [ |
| "manual", # not run by CI |
| "native", |
| ], |
| deps = [ |
| ":test_lib", |
| "//test_folder:test_lib", |
| ], |
| ) |
| |
| sh_test( |
| name = "test_sourcemap", |
| srcs = ["test_sourcemap.sh"], |
| data = [ |
| ":karma_test", |
| "@bazel_tools//tools/bash/runfiles", |
| ], |
| # TODO(gregmagolan): enable this test on bazelci once browers work on all platforms |
| tags = ["no-bazelci"], |
| ) |
| |
| # For testing from the root workspace of this repository with bazel_integration_test. |
| filegroup( |
| name = "all_files", |
| srcs = glob( |
| include = ["**/*"], |
| exclude = [ |
| "bazel-out/**/*", |
| "dist/**/*", |
| "node_modules/**/*", |
| ], |
| ) + [ |
| "//test_folder:all_files", |
| ], |
| visibility = ["//visibility:public"], |
| ) |
| |
| # Just a dummy test so that we have a test target for //... on bazelci ubuntu with bazel_integration_test |
| sh_test( |
| name = "dummy_test", |
| srcs = ["dummy_test.sh"], |
| ) |