From ce51dfb499b65f23520fcd3cc6da4a79208dfaac Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Thu, 3 Jan 2019 17:46:14 -0800 Subject: [PATCH] fix(bazel): ts_web_test_suite now properly includes init_browser_spec.js (#27965) There was an issue where init_browser_spec.js was being run out of order, this change adds it as a runtime dependency so it is executed when it needs to be preventing tests from bombing when they try to read from isNode from global scope before it is defined PR Close #27965 --- tools/defaults.bzl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/defaults.bzl b/tools/defaults.bzl index a5204fc103..dfa3568639 100644 --- a/tools/defaults.bzl +++ b/tools/defaults.bzl @@ -120,16 +120,19 @@ def npm_package(name, replacements = {}, **kwargs): **kwargs ) -def ts_web_test_suite(bootstrap = [], deps = [], **kwargs): +def ts_web_test_suite(bootstrap = [], deps = [], runtime_deps = [], **kwargs): """Default values for ts_web_test_suite""" if not bootstrap: bootstrap = ["//:web_test_bootstrap_scripts"] local_deps = [ "@ngdeps//node_modules/tslib:tslib.js", - "//tools/testing:browser", ] + deps + local_runtime_deps = [ + "//tools/testing:browser", + ] + runtime_deps _ts_web_test_suite( + runtime_deps = local_runtime_deps, bootstrap = bootstrap, deps = local_deps, karma = _DEFAULT_KARMA_BIN,