merge-canary-test-expectations.mjs (497B)
1 /** 2 * @license 3 * Copyright 2024 Google Inc. 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 // Modifies test/TestExpectations.json in place. 8 9 import fs from 'fs'; 10 11 const source = 'test/TestExpectations.json'; 12 const testExpectations = JSON.parse(fs.readFileSync(source, 'utf-8')); 13 const canaryTestExpectations = JSON.parse( 14 fs.readFileSync('test/CanaryTestExpectations.json', 'utf-8'), 15 ); 16 17 fs.writeFileSync( 18 source, 19 JSON.stringify([...testExpectations, ...canaryTestExpectations], null, 2), 20 );