@ -12,7 +12,7 @@ import {SymbolExtractor} from './symbol_extractor';
|
||||
const runfiles = require(process.env['BAZEL_NODE_RUNFILES_HELPER'] as string);
|
||||
|
||||
if (require.main === module) {
|
||||
const args = process.argv.slice(2) as[string, string];
|
||||
const args = process.argv.slice(2) as [string, string];
|
||||
process.exitCode = main(args) ? 0 : 1;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ if (require.main === module) {
|
||||
* cli javascriptFilePath.js goldenFilePath.json
|
||||
* ```
|
||||
*/
|
||||
function main(argv: [string, string, string] | [string, string]): boolean {
|
||||
function main(argv: [string, string, string]|[string, string]): boolean {
|
||||
const javascriptFilePath = runfiles.resolveWorkspaceRelative(argv[0]);
|
||||
const goldenFilePath = runfiles.resolveWorkspaceRelative(argv[1]);
|
||||
const doUpdate = argv[2] == '--accept';
|
||||
@ -44,8 +44,8 @@ function main(argv: [string, string, string] | [string, string]): boolean {
|
||||
const ivyEnabled = process.env['angular_ivy_enabled'] == 'True';
|
||||
console.error(`TEST FAILED!`);
|
||||
console.error(` To update the golden file run: `);
|
||||
console.error(
|
||||
` yarn bazel run --config=${ivyEnabled ? 'ivy' : 'view-engine'} ${process.env['TEST_TARGET']}.accept`);
|
||||
console.error(` yarn bazel run --config=${ivyEnabled ? 'ivy' : 'view-engine'} ${
|
||||
process.env['TEST_TARGET']}.accept`);
|
||||
}
|
||||
}
|
||||
return passed;
|
||||
|
Reference in New Issue
Block a user