Esempio n. 1
0
 it('computes exclusive keys with no first argument', () => {
   const a = null;
   const b = {x: true, y: true, z: true};
   expect(filterExclusiveKeys(a, b)).toEqual([
     [],
     ['x', 'y', 'z'],
   ]);
 });
Esempio n. 2
0
 it('computes exclusive keys with an empty second argument', () => {
   const a = {x: true, y: true, z: true};
   const b = {};
   expect(filterExclusiveKeys(a, b)).toEqual([
     ['x', 'y', 'z'],
     [],
   ]);
 });
Esempio n. 3
0
 it('computes exclusive keys between two objects with overlap', () => {
   const a = {v: true, w: true, x: true};
   const b = {x: true, y: true, z: true};
   expect(filterExclusiveKeys(a, b)).toEqual([
     ['v', 'w'],
     ['y', 'z'],
   ]);
 });