Skip to content

Commit

Permalink
Fixed test gating. Fixed description.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrorykun committed Jun 5, 2024
1 parent 1c2abd6 commit 3a1eb45
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

const {diff, create} = require('../ReactNativeAttributePayloadFabric');

describe('ReactNativeAttributePayload.create', () => {
describe('ReactNativeAttributePayloadFabric.create', () => {
it('should work with simple example', () => {
expect(create({b: 2, c: 3}, {a: true, b: true})).toEqual({
b: 2,
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('ReactNativeAttributePayload.create', () => {
});
});

describe('ReactNativeAttributePayload.diff', () => {
describe('ReactNativeAttributePayloadFabric.diff', () => {
it('should work with simple example', () => {
expect(diff({a: 1, c: 3}, {b: 2, c: 3}, {a: true, b: true})).toEqual({
a: null,
Expand Down Expand Up @@ -201,6 +201,7 @@ describe('ReactNativeAttributePayload.diff', () => {
expect(diff({a: 1}, {b: 2}, {})).toEqual(null);
});

// @gate !enableShallowPropDiffing
it('should use the diff attribute', () => {
const diffA = jest.fn((a, b) => true);
const diffB = jest.fn((a, b) => false);
Expand All @@ -215,7 +216,6 @@ describe('ReactNativeAttributePayload.diff', () => {
expect(diffB).toBeCalledWith([3], [4]);
});

// @gate !enableShallowPropDiffing
it('should not use the diff attribute on addition/removal', () => {
const diffA = jest.fn();
const diffB = jest.fn();
Expand Down

0 comments on commit 3a1eb45

Please sign in to comment.