title: Using switch statement in before block of cypress tests
body: <p>I am trying to run switch block or some other way to achieve this if/else condition</p>
  <pre><code>students.forEach((Product) =&gt; {     // List of products I am iterating 
         before(() =&gt; {
             switch (ProductID) {
                 case 5175125:
                     pirce = 371;  //  I am trying to achieve switch block where based on product ID price is assigned.
                     break;
             }
          cy.request({
              method: 'GET',
              url: `/v1/Auth/token/token`
          }).its('body').then(function (response) {
              token = JSON.parse(response)
              token = token['accessToken']
              return token['accessToken']
          }).as('authToken')
      });
  </code></pre>