title: Cypress : How to get returned value from custom commands ? (Cypress-promise)
body: <p>I'm searching a way to get back a return value returned by a custom Cypress commands. </p>
  
  <p>I'm currently using Cypress and Cypress-promise lib (<a href="https://www.npmjs.com/package/cypress-promise" rel="noreferrer">https://www.npmjs.com/package/cypress-promise</a>)</p>
  
  <p>Currently, result is that:
  log1=CAR 1
  log2=null</p>
  
  <p>Where is my mistake ?</p>
  
  <p><strong>Test file:</strong></p>
  
  <pre><code>it('Test 1', async function() {
       const carName = await promisify(cy.set_typeCarName());
       cy.log("log2 = " + carName );
  });
  </code></pre>
  
  <p><strong>module:</strong></p>
  
  <pre><code>set_typeCarName() {
       let carName = "CAR 1";
       cy.get('#newSiteCityInput').type(carName);
       cy.log("log1 = " + carName);
       return carName;
  };
  
  Cypress.Commands.add('set_typeCarName',() =&gt; {
      webnewsite.set_typeCarName();
  });
  </code></pre>