test function

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
teste1
function getCustomImageHeight() {
  if (isCurrentBrand(BrandId.Vans)) return 148
  if (isCurrentBrand(BrandId.Anacapri)) return 120
  if (isCurrentBrand(BrandId.Birman)) return 170
  return 200
}
ready
teste2
function getCustomImageHeight(brandId) {
  const brandHeights = {
    [BrandId.Vans]: 148,
    [BrandId.Anacapri]: 120,
    [BrandId.Birman]: 170,
    default: 200
  };

  return brandHeights[brandId] || brandHeights.default;
}
ready

Revisions

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