@@ -106,13 +106,13 @@ rollup_bundle(
106106 entry_points = {
107107 ":test_bundling.ts" : "index" ,
108108 },
109+ format = "cjs" ,
109110 output_dir = True ,
110111 deps = [
111112 ":test_bundling_lib" ,
112113 "@npm//@rollup/plugin-commonjs" ,
113114 "@npm//@rollup/plugin-node-resolve" ,
114115 ],
115- format = "cjs" ,
116116)
117117
118118ts_library (
@@ -121,20 +121,49 @@ ts_library(
121121 tsconfig = ":test_bundling_tsconfig.json" ,
122122 deps = [
123123 "//test/proto:naming_styles_ts_proto" ,
124- "//test/proto/common:pizza_ts_proto" ,
125124 "//test/proto:pizza_service_ts_proto" ,
126125 "//test/proto/common:delivery_person_ts_proto" ,
127- "@npm//google-protobuf " ,
126+ "//test/proto/common:pizza_ts_proto " ,
128127 "@npm//@improbable-eng/grpc-web" ,
128+ "@npm//google-protobuf" ,
129129 ],
130130)
131131
132132jasmine_node_test (
133133 name = "rollup_test" ,
134134 srcs = [
135- ":rollup_test.spec.js"
135+ ":rollup_test.spec.js" ,
136136 ],
137137 data = [
138- ":test_es6_bundling"
139- ]
138+ ":test_es6_bundling" ,
139+ ],
140+ )
141+
142+ ts_library (
143+ name = "rollup_test_spec" ,
144+ testonly = True ,
145+ srcs = ["rollup_test.spec.ts" ],
146+ tsconfig = ":tsconfig.json" ,
147+ deps = ["@npm//@types/jasmine" ],
148+ )
149+
150+ karma_web_test_suite (
151+ name = "rollup_browser_test_suite" ,
152+ srcs = [
153+ "require.config.js" ,
154+ ],
155+ browsers = [
156+ "@io_bazel_rules_webtesting//browsers:chromium-local" ,
157+ ],
158+ # Files are served under /base/<WORKSPACE_NAME>/<path>
159+ static_files = [
160+ "@npm//:node_modules/@improbable-eng/grpc-web/dist/grpc-web-client.umd.js" ,
161+ "@npm//:node_modules/browser-headers/dist/browser-headers.umd.js" ,
162+ ":test_es6_bundling" ,
163+ ],
164+ tags = ["native" ],
165+ deps = [
166+ ":rollup_test_spec" ,
167+ ":test_es6_bundling" ,
168+ ],
140169)
0 commit comments