ngtsc has a robust suite of testing utilities, designed for in-memory testing of a TypeScript compiler. Previously these utilities lived in the `test` directory for the compiler-cli package. This commit moves those utilities to an `ngtsc/testing` package, enabling them to be depended on separately and opening the door for using them from the upcoming language server testing infrastructure. As part of this refactoring, the `fake_core` package (a lightweight API replacement for @angular/core) is expanded to include functionality needed for Language Service test use cases. PR Close #39594
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
 | |
| 
 | |
| ts_library(
 | |
|     name = "ngtsc_lib",
 | |
|     testonly = True,
 | |
|     srcs = glob(["**/*.ts"]),
 | |
|     deps = [
 | |
|         "//packages/compiler",
 | |
|         "//packages/compiler-cli",
 | |
|         "//packages/compiler-cli/src/ngtsc/diagnostics",
 | |
|         "//packages/compiler-cli/src/ngtsc/file_system",
 | |
|         "//packages/compiler-cli/src/ngtsc/file_system/testing",
 | |
|         "//packages/compiler-cli/src/ngtsc/indexer",
 | |
|         "//packages/compiler-cli/src/ngtsc/reflection",
 | |
|         "//packages/compiler-cli/src/ngtsc/routing",
 | |
|         "//packages/compiler-cli/src/ngtsc/testing",
 | |
|         "//packages/compiler-cli/src/ngtsc/util",
 | |
|         "//packages/compiler-cli/test:test_utils",
 | |
|         "@npm//source-map",
 | |
|         "@npm//typescript",
 | |
|     ],
 | |
| )
 | |
| 
 | |
| jasmine_node_test(
 | |
|     name = "ngtsc",
 | |
|     timeout = "long",
 | |
|     bootstrap = ["//tools/testing:node_no_angular_es5"],
 | |
|     data = [
 | |
|         "//packages/compiler-cli/src/ngtsc/testing/fake_core:npm_package",
 | |
|     ],
 | |
|     shard_count = 4,
 | |
|     deps = [
 | |
|         ":ngtsc_lib",
 | |
|         "@npm//minimist",
 | |
|     ],
 | |
| )
 |