Fix diffApiSnapshot-test (#54903)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54903

A bit too trigger happy on D89287801(!)

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D89292895

fbshipit-source-id: 793d984253dcf24c394adc8c8646992caf17805d
This commit is contained in:
Alex Hunt
2025-12-16 10:04:16 -08:00
committed by meta-codesync[bot]
parent 73d3429a44
commit 0c947c8d94
@@ -49,7 +49,7 @@ describe('diffApiSnapshot', () => {
expect(res.changedApis).toEqual(['DeletedExport']);
});
test('should detect breaking change when a statement is changed', () => {
test('should detect potentially breaking change when a statement is changed', () => {
const prevSnapshot = `
import * as React from 'react';
export declare type AccessibilityActionEvent = NativeSyntheticEvent<
@@ -78,11 +78,11 @@ describe('diffApiSnapshot', () => {
`;
const res = diffApiSnapshot(prevSnapshot, newSnapshot);
expect(res.result).toBe(Result.BREAKING);
expect(res.result).toBe(Result.POTENTIALLY_BREAKING);
expect(res.changedApis).toEqual(['Foo']);
});
test('should detect potentially not breaking change when a statement is added', () => {
test('should detect potentially non-breaking change when a statement is added', () => {
const prevSnapshot = `
import * as React from 'react';
declare type AccessibilityActionEvent = NativeSyntheticEvent<
@@ -117,7 +117,7 @@ describe('diffApiSnapshot', () => {
expect(res.changedApis).toEqual(['NewExport']);
});
test('should detect not breaking change when nothing is changed', () => {
test('should detect non-breaking change when nothing is changed', () => {
const prevSnapshot = `
import * as React from 'react';
declare type AccessibilityActionEvent = NativeSyntheticEvent<