function CxApiMock() { this.chooseVariation = chooseVariation; function chooseVariation() { return 0; } } window.cxApi = new CxApiMock();