Skip to content

Commit 128f5eb

Browse files
coadofacebook-github-bot
authored andcommitted
Validate RN JS API snapshot on CI (#52352)
Summary: Pull Request resolved: #52352 This diff adds excution of `yarn build-types --validate` to run RN JS API snapshot validation on CI. ### Motivation Detect react-native public API changes before they land. Changelog: [Internal] Reviewed By: huntie Differential Revision: D76340729 fbshipit-source-id: 10c465418e0ba4eb05cf557a16119f9756843d9e
1 parent 8f9bca5 commit 128f5eb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

scripts/run-ci-javascript-tests.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ try {
5656
throw Error(exitCode);
5757
}
5858

59+
describe('Test: Validate JS API snapshot');
60+
if (execSync(`${YARN_BINARY} run build-types --validate`).code) {
61+
echo(
62+
'JS API snapshot validation failed. Please run `yarn build-types` to update the snapshot.',
63+
);
64+
exitCode = 1;
65+
throw Error(exitCode);
66+
}
67+
5968
describe('Test: Flow check');
6069
const flowCommand =
6170
FLOW_BINARY == null

0 commit comments

Comments
 (0)