Skip to content

Commit

Permalink
build: migrate @schematics/angular tests to rules_js
Browse files Browse the repository at this point in the history
Migrates the @schematics/angular tests to `rules_js`.
  • Loading branch information
devversion authored and clydin committed Jan 23, 2025
1 parent bf8e208 commit 717706d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 39 deletions.
30 changes: 14 additions & 16 deletions packages/schematics/angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.dev/license

load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults2.bzl", "npm_package", "ts_project")
load("@npm2//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "ts_project")
load("//tools:ts_json_schema.bzl", "ts_json_schema")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

npm_link_all_packages()

# Create a list of Tuple("path/file.json", "path_file") to be used as rules
ALL_SCHEMA_TARGETS = [
(
Expand Down Expand Up @@ -81,22 +83,21 @@ ts_project(
data = RUNTIME_ASSETS,
module_name = "@schematics/angular",
deps = [
":node_modules/@angular-devkit/core",
":node_modules/@angular-devkit/schematics",
"//:node_modules/@inquirer/prompts",
"//:node_modules/@types/node",
"//:node_modules/browserslist",
"//:node_modules/jsonc-parser",
"//packages/angular_devkit/core:core_rjs",
"//packages/angular_devkit/schematics:schematics_rjs",
"//packages/angular_devkit/schematics/tasks:tasks_rjs",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:TypeScript_rjs",
],
)

jasmine_node_test(
jasmine_test(
name = "no_typescript_runtime_dep_test",
srcs = ["no_typescript_runtime_dep_spec.js"],
deps = [
":angular",
data = [
"no_typescript_runtime_dep_spec.js",
":angular_rjs",
"//:node_modules/@types/jasmine",
],
)
Expand All @@ -116,20 +117,17 @@ ts_project(
),
deps = [
":angular_rjs",
":node_modules/@angular-devkit/core",
":node_modules/@angular-devkit/schematics",
"//:node_modules/@types/jasmine",
"//:node_modules/jsonc-parser",
"//packages/angular_devkit/core:core_rjs",
"//packages/angular_devkit/core/node/testing:testing_rjs",
"//packages/angular_devkit/schematics:schematics_rjs",
"//packages/angular_devkit/schematics/tasks:tasks_rjs",
"//packages/angular_devkit/schematics/testing:testing_rjs",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript:TypeScript_rjs",
],
)

jasmine_node_test(
jasmine_test(
name = "angular_test",
srcs = [":angular_test_lib"],
data = [":angular_test_lib_rjs"],
)

genrule(
Expand Down
45 changes: 22 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 717706d

Please sign in to comment.