Alan Agius 4b4cecf88f test: update tests to work with Jasmine version 4
These changes include fixes to tests, timeout and stop of architect to make tests work with Jasmine 4.

One noticeable change that when we didn't stop architect through `run.stop()` this causes Bazel to timeout now.

Example
```
-- Test timed out at 2022-03-24 12:07:07 UTC --
/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/sandbox/darwin-sandbox/398/execroot/angular_cli/bazel-out/darwin-fastbuild/bin/packages/angular_devkit/build_angular/build_angular_browser_test.sh.runfiles/angular_cli/packages/angular_devkit/build_angular/build_angular_browser_test.sh: line 424: 41835 Terminated: 15          "${node}" ${LAUNCHER_NODE_OPTIONS[@]+"${LAUNCHER_NODE_OPTIONS[@]}"} ${USER_NODE_OPTIONS[@]+"${USER_NODE_OPTIONS[@]}"} "${MAIN}" ${ARGS[@]+"${ARGS[@]}"} 0<&0
```
2022-03-24 14:41:26 +01:00

65 lines
1.5 KiB
Python

# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "ts_library")
licenses(["notice"]) # MIT License
package(default_visibility = ["//visibility:public"])
ts_library(
name = "node",
srcs = glob(
include = ["**/*.ts"],
exclude = [
"testing/**/*.ts",
"**/*_spec.ts",
"**/*_benchmark.ts",
],
),
data = ["package.json"],
module_name = "@angular-devkit/core/node",
module_root = "index.d.ts",
# The attribute below is needed in g3 to turn off strict typechecking
# strict_checks = False,
deps = [
"//packages/angular_devkit/core",
"@npm//@types/node",
"@npm//chokidar",
"@npm//rxjs",
],
)
ts_library(
name = "node_test_lib",
testonly = True,
srcs = glob(
include = [
"**/*_spec.ts",
],
exclude = [
"testing/**/*.ts",
],
),
deps = [
":node",
"//packages/angular_devkit/core",
"//tests/angular_devkit/core/node/jobs:jobs_test_lib",
"@npm//rxjs",
],
)
jasmine_node_test(
name = "node_test",
srcs = [":node_test_lib"],
deps = [
"@npm//chokidar",
# @node_module: ajv
# @node_module: fast_json_stable_stringify
# @node_module: magic_string
],
)