7
7
"@npm_bazel_typescript//:index.bzl" ,
8
8
_ts_library = "ts_library" ,
9
9
)
10
- load ("@npm_bazel_karma//:index.bzl" , _karma_web_test_suite = "karma_web_test_suite" )
11
10
12
11
DEFAULT_TSCONFIG_BUILD = "//modules:bazel-tsconfig-build.json"
13
12
DEFAULT_TSCONFIG_TEST = "//modules:bazel-tsconfig-test"
@@ -84,15 +83,6 @@ GLOBALS = {
84
83
"tslib" : "tslib" ,
85
84
}
86
85
87
- # TODO(Toxicable): when a better api for defaults is avilable use that instead of these macros
88
- def ts_test_library (deps = [], tsconfig = None , ** kwargs ):
89
- local_deps = deps
90
- ts_library (
91
- testonly = 1 ,
92
- deps = local_deps ,
93
- ** kwargs
94
- )
95
-
96
86
def ng_module (name , tsconfig = None , testonly = False , deps = [], bundle_dts = True , ** kwargs ):
97
87
deps = deps + ["@npm//tslib" , "@npm//@types/node" ]
98
88
if not tsconfig :
@@ -127,8 +117,12 @@ def ng_test_library(deps = [], tsconfig = None, **kwargs):
127
117
"@npm//@types/jasmine" ,
128
118
] + deps
129
119
120
+ if not tsconfig :
121
+ tsconfig = _getDefaultTsConfig (1 )
122
+
130
123
ts_library (
131
124
testonly = 1 ,
125
+ tsconfig = tsconfig ,
132
126
deps = local_deps ,
133
127
** kwargs
134
128
)
@@ -144,16 +138,3 @@ def pkg_npm(name, substitutions = {}, **kwargs):
144
138
substitutions = dict (substitutions , ** PKG_GROUP_REPLACEMENTS ),
145
139
** kwargs
146
140
)
147
-
148
- def ng_web_test_suite (deps = [], srcs = [], ** kwargs ):
149
- _karma_web_test_suite (
150
- # Required for running the compiled ng modules that use TypeScript import helpers.
151
- srcs = ["@npm//:node_modules/tslib/tslib.js" ] + srcs ,
152
- # Depend on our custom test initialization script. This needs to be the first dependency.
153
- deps = ["//test:angular_test_init" ] + deps ,
154
- bootstrap = [
155
- "@npm//:node_modules/zone.js/dist/zone-testing-bundle.js" ,
156
- "@npm//:node_modules/reflect-metadata/Reflect.js" ,
157
- ],
158
- ** kwargs
159
- )
0 commit comments