Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

340
Views
No se pueden establecer propiedades de una biblioteca de socket simulada no definida (estableciendo 'oyentes') cuando se burla del socket web en Cypress

Tengo un servidor simulado en mi archivo de prueba de Cypress

 const getServer = () => { return new Cypress.Promise(resolve => { const mockServer = Server('Websocket URL') let mockSocket mockServer.on('connection', (socketHandle) => { resolve(socketHandle) }) }) } const socketPromise = getServer()

Cada vez que quiero enviar un mensaje a mi cliente desde mi socket web, lo llamo con un cy.wrap usando

 cy.wrap(socketPromise).then((mockSocket) => { mockSocket.send({fixture: 'WebSocketMocks/WebSocketInitialised.json'}) })

Pero recibo este error proveniente de la biblioteca de sockets simulados en mi seguimiento de pila

 var EventTarget = function EventTarget() { > 742 | this.listeners = {}; | ^ 743 | };

Salud :)

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!