Skip to content

Commit

Permalink
test(@angular-devkit/schematics-cli): test with Bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
filipesilva authored and mgechev committed Apr 7, 2020
1 parent ee24d32 commit fca831c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"git-raw-commits": "^2.0.0",
"glob": "^7.0.3",
"husky": "^4.0.10",
"inquirer": "7.1.0",
"jasmine": "^3.3.1",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~4.4.1",
Expand All @@ -136,6 +137,7 @@
"source-map": "^0.7.3",
"source-map-support": "^0.5.0",
"spdx-satisfies": "^5.0.0",
"symbol-observable": "1.2.0",
"tar": "^6.0.0",
"temp": "^0.9.0",
"through2": "^3.0.0",
Expand Down
32 changes: 30 additions & 2 deletions packages/angular_devkit/schematics_cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package(default_visibility = ["//visibility:public"])

load("@npm_bazel_typescript//:index.bzl", "ts_library")
load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")

licenses(["notice"])

Expand All @@ -20,19 +21,46 @@ ts_library(
"bin/**/*_benchmark.ts",
],
),
module_name = "@angular-devkit/schematics-cli",
module_root = "bin",
# The attribute below is needed in g3 to turn off strict typechecking
# strict_checks = False,
data = glob(["**/*.json"]),
module_name = "@angular-devkit/schematics-cli",
module_root = "bin/schematics.d.ts",
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics/tasks",
"//packages/angular_devkit/schematics/tools",
"//packages/schematics/schematics",
"@npm//@types/inquirer",
"@npm//@types/minimist",
"@npm//@types/node",
"@npm//inquirer",
"@npm//minimist",
"@npm//rxjs",
"@npm//symbol-observable",
],
)

ts_library(
name = "schematics_cli_test_lib",
testonly = True,
srcs = glob(
include = [
"bin/**/*_spec.ts",
],
),
# strict_checks = False,
tsconfig = "//:tsconfig-test.json",
deps = [
":schematics_cli",
"@npm//@types/jasmine",
"@npm//@types/node",
],
)

jasmine_node_test(
name = "schematics_cli_test",
srcs = [":schematics_cli_test_lib"],
)

0 comments on commit fca831c

Please sign in to comment.