import{getScriptLoadParams}from"../functions";describe("Paypal Buttons Functions",(()=>{describe("getScriptLoadParams",(()=>{it("should not use merchant_id for CIB subscriptions",(()=>{expect(getScriptLoadParams({clientId:"client_id",reusable:!0,merchantId:"merchant_id",currency:"eur",merchantInitiated:!1})).toEqual({"client-id":"client_id",commit:!1,intent:"tokenize",vault:!0,currency:"EUR"})})),it("should use merchant_id for MIB subscriptions",(()=>{expect(getScriptLoadParams({clientId:"client_id",reusable:!0,merchantId:"merchant_id",currency:"eur",merchantInitiated:!0})).toEqual({"client-id":"client_id",commit:!1,intent:"tokenize","merchant-id":"merchant_id",vault:!0,currency:"EUR"})})),it("should use a merchant_id for a non-subscription order (regardless of CIB/MIB)",(()=>{expect(getScriptLoadParams({clientId:"client_id",reusable:!1,merchantId:"merchant_id",currency:"eur",merchantInitiated:!1})).toEqual({"client-id":"client_id",commit:!1,intent:"capture",vault:!0,"merchant-id":"merchant_id",currency:"EUR"}),expect(getScriptLoadParams({clientId:"client_id",reusable:!1,merchantId:"merchant_id",currency:"eur",merchantInitiated:!0})).toEqual({"client-id":"client_id",commit:!1,intent:"capture",vault:!0,"merchant-id":"merchant_id",currency:"EUR"})}))}))}));