import{hasAddressData,isAddressEmpty}from"../index";describe("hasAddressData",(()=>{it("is true for a populated address",(()=>{expect(hasAddressData({line_1:"Rua da Floresta",city:"Goiania",country:"BR"})).toBe(!0)})),it("is true when only a country is saved (country-only shipping address)",(()=>{expect(hasAddressData({country:"BR",line_1:null,line_2:null,city:null,state:null,postal_code:null,name:null})).toBe(!0)})),it("is false for a fully empty address",(()=>{expect(hasAddressData({country:null,line_1:null,city:null,state:null,postal_code:null,name:null})).toBe(!1)})),it('is false for the API "none" array',(()=>{expect(hasAddressData([])).toBe(!1)})),it("is false for null/undefined",(()=>{expect(hasAddressData(null)).toBe(!1),expect(hasAddressData(void 0)).toBe(!1)}))})),describe("isAddressEmpty",(()=>{it("ignores country when deciding emptiness (IP-detected, must not block autofill)",(()=>{expect(isAddressEmpty({country:"BR"})).toBe(!0)})),it("is false once a content field is set",(()=>{expect(isAddressEmpty({country:"BR",city:"Goiania"})).toBe(!1)})),it("is true for null/undefined",(()=>{expect(isAddressEmpty(null)).toBe(!0),expect(isAddressEmpty(void 0)).toBe(!0)}))}));