mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
build: rework signals acceptance tests build setup (#54213)
* Renames the `input_signals` directory to `signals` so it can be reused for other tests. * Reworks the build file to allow multiple test files. PR Close #54213
This commit is contained in:
parent
bdf6927125
commit
fc5fe3e8e9
3 changed files with 10 additions and 13 deletions
|
|
@ -2,7 +2,9 @@ load("//tools:defaults.bzl", "jasmine_node_test", "karma_web_test_suite", "ng_mo
|
|||
|
||||
package(default_visibility = ["//visibility:private"])
|
||||
|
||||
TEST_FILE = "signal_inputs_spec"
|
||||
TEST_FILES = [
|
||||
"signal_inputs_spec",
|
||||
]
|
||||
|
||||
TEST_DEPS = [
|
||||
"//packages/core",
|
||||
|
|
@ -12,7 +14,7 @@ TEST_DEPS = [
|
|||
ts_library(
|
||||
name = "test_compiler_lib",
|
||||
testonly = True,
|
||||
srcs = ["signal_inputs_test_compiler.ts"],
|
||||
srcs = ["authoring_test_compiler.ts"],
|
||||
deps = [
|
||||
"//packages/compiler-cli",
|
||||
"//packages/compiler-cli/src/ngtsc/partial_evaluator",
|
||||
|
|
@ -26,32 +28,29 @@ nodejs_binary(
|
|||
name = "test_compiler",
|
||||
testonly = True,
|
||||
data = [":test_compiler_lib"],
|
||||
entry_point = ":signal_inputs_test_compiler.ts",
|
||||
entry_point = ":authoring_test_compiler.ts",
|
||||
)
|
||||
|
||||
npm_package_bin(
|
||||
name = "processed_test_sources",
|
||||
testonly = True,
|
||||
outs = ["tansformed_%s.ts" % TEST_FILE],
|
||||
args = [
|
||||
"$(execpath %s.ts)" % TEST_FILE,
|
||||
"$@",
|
||||
],
|
||||
data = ["%s.ts" % TEST_FILE],
|
||||
outs = ["transformed_%s.ts" % file for file in TEST_FILES],
|
||||
args = ["$(execpath %s.ts)" % file for file in TEST_FILES] + ["$@"],
|
||||
data = ["%s.ts" % file for file in TEST_FILES],
|
||||
tool = ":test_compiler",
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "test_jit_lib",
|
||||
testonly = True,
|
||||
srcs = ["tansformed_%s.ts" % TEST_FILE],
|
||||
srcs = ["transformed_%s.ts" % file for file in TEST_FILES],
|
||||
deps = TEST_DEPS,
|
||||
)
|
||||
|
||||
ng_module(
|
||||
name = "test_lib",
|
||||
testonly = True,
|
||||
srcs = ["%s.ts" % TEST_FILE],
|
||||
srcs = ["%s.ts" % file for file in TEST_FILES],
|
||||
deps = TEST_DEPS,
|
||||
)
|
||||
|
||||
|
|
@ -6,7 +6,6 @@
|
|||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {PartialEvaluator} from '@angular/compiler-cli/src/ngtsc/partial_evaluator';
|
||||
import {TypeScriptReflectionHost} from '@angular/compiler-cli/src/ngtsc/reflection';
|
||||
import {getInitializerApiJitTransform} from '@angular/compiler-cli/src/transformers/jit_transforms';
|
||||
import fs from 'fs';
|
||||
|
|
@ -27,7 +26,6 @@ async function main() {
|
|||
});
|
||||
|
||||
const host = new TypeScriptReflectionHost(program.getTypeChecker());
|
||||
const evaluator = new PartialEvaluator(host, program.getTypeChecker(), null);
|
||||
const outputFile = ts.transform(
|
||||
program.getSourceFile(inputTsExecPath)!,
|
||||
[getInitializerApiJitTransform(host, /* isCore */ false)], program.getCompilerOptions());
|
||||
Loading…
Reference in a new issue