I'm trying to mock a rest call in Cypress. This rest call should return a map as response, e.g.:
cy.intercept('POST', 'path', new Map([['a', 'abc']])
The problem is that this will return an empty object instead of the expected map.
To make it work, I have to write the map like:
cy.intercept('POST', 'path', {a: 'abc'})
Note: I'm using TS and, inside its configuration file, I have target: es5
and "lib": ["esnext"]