I have a stubbed method that is having the following structure printed in the Cypress console:
myMethod('start', Object{5})
I know that the object has a key, segmentB -> when console logging it in the stub, I see it but I do not want to start making assertions in the stub
I want to assert, that the value of segmentB starts with 'MPI_'
I though of combining "should be called with match" and Cypress.sinon assertions like the following, but it is not working.
 cy
        .get('@myMethod')
        .should('be.calledWithMatch', 'start', {
          segmentB: Cypress.sinon.match(/^MPI_/)
      })
.should('beCalledWithMatch', 'start') or asserting key/value pairs of the objects without variable parts works, but I'd appreciate any help for asserting with a regex.
Thanks :)
 
    