I am relatively new to web components and testing them. How do I test the functionality of a function?
createObjForStartBusiness() {
this.financingObj = [];
if (this.dropDownValue === common.ONE_YEAR_OR_LESS) {
if (this.ammountEntered >= 1250 && this.ammountEntered <= common.MAX_ALLOWED_VALUE) {
this.financingObj.push(this.createFinancingStructure('BusinessLine'));
}
if (this.ammountEntered >= 25000 && this.ammountEntered <= common.MAX_ALLOWED_VALUE) {
this.financingObj.push(this.createFinancingStructure('Opticash'));
}
} else if (this.dropDownValue === common.OVER_ONE_YEAR) {
if (this.ammountEntered >= 2000 && this.ammountEntered <= 999999) {
this.financingObj.push(this.createFinancingStructure('BusinessLoan'));
}
if (this.ammountEntered >= 10000 && this.ammountEntered <= common.MAX_ALLOWED_VALUE) {
this.financingObj.push(this.createFinancingStructure('Leasing'));
}
if (this.ammountEntered >= 250000 && this.ammountEntered <= common.MAX_ALLOWED_VALUE) {
this.financingObj.push(this.createFinancingStructure('InvestmentLoan'));
}
}
}
This is the function. Any help will be greatly appreciated.