title: How will we call a function written in a separate file from a Cypress test?
body: <p>In Cypress.io test, I am calling a subtract function and tests written in the 'example-spec' as below. This is working fine. But how will we call the same subtract function written in a different js file, for example '/basetest.js' from the Cypress test?</p>
  
  <pre><code>describe ('Calling a function', function(){
  it('Call the Subtract function and asert the calculation', function(){
      cy
      .wrap({sub: subValues})
      .invoke('sub', 15, 8)
      .should('eq', 7) // true        
      })
  
  })
  </code></pre>
  
  <p>// Subtract function:  </p>
  
  <pre><code>const subValues = (a, b) =&gt; {
    return a - b 
  }
  </code></pre>