test component

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Omar
const featureToggle = () => true

const policyHasExtendedGradeCheckProductCode = productCode => {
	if(!featureToggle){
		return false;
	}
    switch (productCode) {
      case 'BONI':
      case 'GRDCK':
      case 'CA2':
        return true
      default:
        return false
    }
 }
 
 policyHasExtendedGradeCheckProductCode("CA2")
ready
clémentine
const featureToggle = () => true

const policyHasExtendedGradeCheckProductCode = productCode => featureToggle('tmp-extended-grade-check') && ['BONI', 'GRDCK', 'CA2'].includes(productCode)

policyHasExtendedGradeCheckProductCode('CA2')
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.