Skip to content

Commit c9ac0e3

Browse files
committed
Fix lint/prettier
1 parent bd6c6e9 commit c9ac0e3

File tree

1 file changed

+37
-26
lines changed

1 file changed

+37
-26
lines changed

packages/react-native-renderer/src/__tests__/ReactFabric-test.internal.js

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,9 @@ describe('ReactFabric', () => {
932932
'\n in RCTView (at **)' +
933933
'\n in ContainsStrictModeChild (at **)',
934934
]);
935-
expect(match).toBe(ReactNativePrivateInterface.getNativeTagFromPublicInstance(child));
935+
expect(match).toBe(
936+
ReactNativePrivateInterface.getNativeTagFromPublicInstance(child),
937+
);
936938
});
937939

938940
it('findNodeHandle should warn if passed a component that is inside StrictMode', async () => {
@@ -969,7 +971,9 @@ describe('ReactFabric', () => {
969971
'\n in RCTView (at **)' +
970972
'\n in IsInStrictMode (at **)',
971973
]);
972-
expect(match).toBe(ReactNativePrivateInterface.getNativeTagFromPublicInstance(child));
974+
expect(match).toBe(
975+
ReactNativePrivateInterface.getNativeTagFromPublicInstance(child),
976+
);
973977
});
974978

975979
it('should no-op if calling sendAccessibilityEvent on unmounted refs', async () => {
@@ -1010,27 +1014,21 @@ describe('ReactFabric', () => {
10101014
uiViewClassName: 'RCTView',
10111015
}));
10121016

1013-
let viewRef;
10141017
await act(() => {
1015-
ReactFabric.render(
1016-
<View
1017-
foo="test"
1018-
ref={ref => {
1019-
viewRef = ref;
1020-
}}
1021-
/>,
1022-
1,
1023-
);
1018+
ReactFabric.render(<View foo="test" />, 1);
10241019
});
10251020

1026-
const internalInstanceHandle = nativeFabricUIManager.createNode.mock.calls[0][4];
1021+
const internalInstanceHandle =
1022+
nativeFabricUIManager.createNode.mock.calls[0][4];
10271023
expect(internalInstanceHandle).toEqual(expect.any(Object));
10281024

10291025
const expectedShadowNode =
10301026
nativeFabricUIManager.createNode.mock.results[0].value;
10311027
expect(expectedShadowNode).toEqual(expect.any(Object));
10321028

1033-
const node = ReactFabric.getNodeFromInternalInstanceHandle(internalInstanceHandle);
1029+
const node = ReactFabric.getNodeFromInternalInstanceHandle(
1030+
internalInstanceHandle,
1031+
);
10341032
expect(node).toBe(expectedShadowNode);
10351033
});
10361034

@@ -1053,10 +1051,14 @@ describe('ReactFabric', () => {
10531051
);
10541052
});
10551053

1056-
const internalInstanceHandle = nativeFabricUIManager.createNode.mock.calls[0][4];
1054+
const internalInstanceHandle =
1055+
nativeFabricUIManager.createNode.mock.calls[0][4];
10571056
expect(internalInstanceHandle).toEqual(expect.any(Object));
10581057

1059-
const publicInstance = ReactFabric.getPublicInstanceFromInternalInstanceHandle(internalInstanceHandle);
1058+
const publicInstance =
1059+
ReactFabric.getPublicInstanceFromInternalInstanceHandle(
1060+
internalInstanceHandle,
1061+
);
10601062
expect(publicInstance).toBe(viewRef);
10611063
});
10621064

@@ -1069,26 +1071,35 @@ describe('ReactFabric', () => {
10691071
}));
10701072

10711073
await act(() => {
1072-
ReactFabric.render(
1073-
<RCTText>Text content</RCTText>,
1074-
1,
1075-
);
1074+
ReactFabric.render(<RCTText>Text content</RCTText>, 1);
10761075
});
10771076

10781077
// Access the internal instance handle used to create the text node.
1079-
const internalInstanceHandle = nativeFabricUIManager.createNode.mock.calls[0][4];
1078+
const internalInstanceHandle =
1079+
nativeFabricUIManager.createNode.mock.calls[0][4];
10801080
expect(internalInstanceHandle).toEqual(expect.any(Object));
10811081

10821082
// Text public instances should be created lazily.
1083-
expect(ReactNativePrivateInterface.createPublicTextInstance).not.toHaveBeenCalled();
1083+
expect(
1084+
ReactNativePrivateInterface.createPublicTextInstance,
1085+
).not.toHaveBeenCalled();
10841086

1085-
const publicInstance = ReactFabric.getPublicInstanceFromInternalInstanceHandle(internalInstanceHandle);
1087+
const publicInstance =
1088+
ReactFabric.getPublicInstanceFromInternalInstanceHandle(
1089+
internalInstanceHandle,
1090+
);
10861091

10871092
// We just requested the text public instance, so it should have been created at this point.
1088-
expect(ReactNativePrivateInterface.createPublicTextInstance).toHaveBeenCalledTimes(1);
1089-
expect(ReactNativePrivateInterface.createPublicTextInstance).toHaveBeenCalledWith(internalInstanceHandle);
1093+
expect(
1094+
ReactNativePrivateInterface.createPublicTextInstance,
1095+
).toHaveBeenCalledTimes(1);
1096+
expect(
1097+
ReactNativePrivateInterface.createPublicTextInstance,
1098+
).toHaveBeenCalledWith(internalInstanceHandle);
10901099

1091-
const expectedPublicInstance = ReactNativePrivateInterface.createPublicTextInstance.mock.results[0].value;
1100+
const expectedPublicInstance =
1101+
ReactNativePrivateInterface.createPublicTextInstance.mock.results[0]
1102+
.value;
10921103
expect(publicInstance).toBe(expectedPublicInstance);
10931104
});
10941105
});

0 commit comments

Comments
 (0)