Skip to content

Commit ca657bf

Browse files
committed
prettier
1 parent cf9168f commit ca657bf

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

packages/react-native-renderer/src/ReactNativeAttributePayloadFabric.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,10 @@ function fastAddProperties(
487487
} else {
488488
continue;
489489
}
490-
} else if (typeof attributeConfig === 'object' && typeof attributeConfig.process === 'function') {
490+
} else if (
491+
typeof attributeConfig === 'object' &&
492+
typeof attributeConfig.process === 'function'
493+
) {
491494
// An atomic prop with custom processing.
492495
newValue = attributeConfig.process(prop);
493496
} else if (typeof prop === 'function') {

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ describe('ReactNativeAttributePayloadFabric.create', () => {
103103
});
104104

105105
it('should use the process attribute for functions as well', () => {
106-
const process = (x) => x;
107-
const nextFunction = () => {}
108-
expect(create({a: nextFunction}, {a: {process}})).toEqual({a: nextFunction});
109-
})
106+
const process = x => x;
107+
const nextFunction = () => {};
108+
expect(create({a: nextFunction}, {a: {process}})).toEqual({
109+
a: nextFunction,
110+
});
111+
});
110112

111113
it('should work with undefined styles', () => {
112114
expect(create({style: undefined}, {style: {b: true}})).toEqual(null);
@@ -464,7 +466,7 @@ describe('ReactNativeAttributePayloadFabric.diff', () => {
464466

465467
it('should use the process function config when prop is a function', () => {
466468
const process = jest.fn(a => a);
467-
const nextFunction = function () {}
469+
const nextFunction = function () {};
468470
expect(
469471
diff(
470472
{
@@ -476,6 +478,6 @@ describe('ReactNativeAttributePayloadFabric.diff', () => {
476478
{a: {process}},
477479
),
478480
).toEqual({a: nextFunction});
479-
expect(process).toBeCalled()
480-
})
481+
expect(process).toBeCalled();
482+
});
481483
});

0 commit comments

Comments
 (0)