1import { getUsesNonExemptEncryption, setUsesNonExemptEncryption } from '../UsesNonExemptEncryption'; 2 3describe('uses non exempt encryption', () => { 4 it(`returns null if key not specified`, () => { 5 expect(getUsesNonExemptEncryption({})).toBe(null); 6 }); 7 8 it(`returns the value if given`, () => { 9 expect( 10 getUsesNonExemptEncryption({ ios: { config: { usesNonExemptEncryption: false } } }) 11 ).toBe(false); 12 13 expect(getUsesNonExemptEncryption({ ios: { config: { usesNonExemptEncryption: true } } })).toBe( 14 true 15 ); 16 }); 17 18 it(`sets ITSAppUsesNonExemptEncryption the key is given`, () => { 19 expect( 20 setUsesNonExemptEncryption({ ios: { config: { usesNonExemptEncryption: false } } }, {}) 21 ).toMatchObject({ 22 ITSAppUsesNonExemptEncryption: false, 23 }); 24 }); 25 26 it(`makes no changes to the infoPlist no config is provided`, () => { 27 expect(setUsesNonExemptEncryption({}, {})).toMatchObject({}); 28 }); 29}); 30