10
10
11
11
const { diff, create} = require ( '../ReactNativeAttributePayloadFabric' ) ;
12
12
13
- describe ( 'ReactNativeAttributePayload .create' , ( ) => {
13
+ describe ( 'ReactNativeAttributePayloadFabric .create' , ( ) => {
14
14
it ( 'should work with simple example' , ( ) => {
15
15
expect ( create ( { b : 2 , c : 3 } , { a : true , b : true } ) ) . toEqual ( {
16
16
b : 2 ,
@@ -171,7 +171,7 @@ describe('ReactNativeAttributePayload.create', () => {
171
171
} ) ;
172
172
} ) ;
173
173
174
- describe ( 'ReactNativeAttributePayload .diff' , ( ) => {
174
+ describe ( 'ReactNativeAttributePayloadFabric .diff' , ( ) => {
175
175
it ( 'should work with simple example' , ( ) => {
176
176
expect ( diff ( { a : 1 , c : 3 } , { b : 2 , c : 3 } , { a : true , b : true } ) ) . toEqual ( {
177
177
a : null ,
@@ -201,6 +201,7 @@ describe('ReactNativeAttributePayload.diff', () => {
201
201
expect ( diff ( { a : 1 } , { b : 2 } , { } ) ) . toEqual ( null ) ;
202
202
} ) ;
203
203
204
+ // @gate !enableShallowPropDiffing
204
205
it ( 'should use the diff attribute' , ( ) => {
205
206
const diffA = jest . fn ( ( a , b ) => true ) ;
206
207
const diffB = jest . fn ( ( a , b ) => false ) ;
@@ -215,7 +216,6 @@ describe('ReactNativeAttributePayload.diff', () => {
215
216
expect ( diffB ) . toBeCalledWith ( [ 3 ] , [ 4 ] ) ;
216
217
} ) ;
217
218
218
- // @gate !enableShallowPropDiffing
219
219
it ( 'should not use the diff attribute on addition/removal' , ( ) => {
220
220
const diffA = jest . fn ( ) ;
221
221
const diffB = jest . fn ( ) ;
0 commit comments