Pete Bacon Darwin 793d66afa5 test(compiler-cli): create "full compile" compliance test rules (#39617)
This commit contains the basic runner logic and a couple of sample test cases
for the "full compile" compliance tests, where source files are compiled
to full definitions and checked against expectations.

PR Close #39617
2020-11-13 11:25:56 -08:00

24 lines
853 B
TypeScript

/**
* @license
* Copyright Google LLC 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
*/
import {FileSystem} from '../../../src/ngtsc/file_system';
import {compileTest} from '../test_helpers/compile_test';
import {ComplianceTest} from '../test_helpers/get_compliance_tests';
import {runTests} from '../test_helpers/test_runner';
runTests('full compile', compileTests);
/**
* Fully compile all the input files in the given `test`.
*
* @param fs The mock file-system where the input files can be found.
* @param test The compliance test whose input files should be compiled.
*/
function compileTests(fs: FileSystem, test: ComplianceTest): void {
compileTest(fs, test.inputFiles, test.compilerOptions, test.angularCompilerOptions);
}