豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 6516473

Browse files
committed
test: add test for bazel browser configuration
Adds a test for the Bazel browser configuration.
1 parent 15b89a6 commit 6516473

File tree

4 files changed

+447
-20
lines changed

4 files changed

+447
-20
lines changed

bazel/browsers/test/BUILD.bazel

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
2+
load("@npm//@bazel/concatjs:index.bzl", "karma_web_test_suite")
3+
load("//bazel/spec-bundling:index.bzl", "spec_bundle")
4+
5+
karma_web_test_suite(
6+
name = "test",
7+
browsers = [
8+
"//bazel/browsers/chromium:chromium",
9+
"//bazel/browsers/firefox:firefox",
10+
],
11+
deps = [
12+
":test_bundle",
13+
],
14+
)
15+
16+
js_library(
17+
name = "test_lib",
18+
srcs = ["browser-test.spec.mjs"],
19+
)
20+
21+
spec_bundle(
22+
name = "test_bundle",
23+
platform = "browser",
24+
workspace_name = "dev-infra",
25+
deps = [":test_lib"],
26+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
describe('browser test', () => {
10+
it('should work', () => {
11+
expect(true).toBe(true);
12+
});
13+
});

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,15 @@
101101
"@types/yarnpkg__lockfile": "^1.1.5",
102102
"jsdoc": "^3.6.7",
103103
"jsdom": "^19.0.0",
104+
"karma": "^6.3.15",
105+
"karma-chrome-launcher": "^3.1.0",
106+
"karma-firefox-launcher": "^2.1.2",
107+
"karma-jasmine": "^4.0.1",
108+
"karma-requirejs": "^1.1.0",
109+
"karma-sourcemap-loader": "^0.3.8",
104110
"minimist": "^1.2.5",
105111
"protobufjs": "^6.11.2",
112+
"requirejs": "^2.3.6",
106113
"rxjs": "^7.4.0",
107114
"uglify-js": "^3.14.2",
108115
"wait-on": "^6.0.0",

0 commit comments

Comments
 (0)