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

210
Views
TypeError: popupAjax no es una función en la prueba Jasmine

estoy haciendo una prueba en una función js, y cuando jasmine ingresa a la función, devuelve esto:

 TypeError: popupAjax is not a function at buscarAuditoria (file:///C:/Dev/Entorno_Desarrollo/Git/IBERGAUDI/java/sigaudit/WebContent/js/sigaudit/hallazgos/detalleHallazgos.js:358:3) at UserContext.<anonymous> (file:///C:/Dev/Entorno_Desarrollo/Git/IBERGAUDI/java/sigaudit/WebContent/js/jasmine/spec/detalleHallazgosSpec.js:25:28) at <Jasmine>

Este es el código en mi archivo de especificaciones:

 it("prueba para buscar auditoria", function () { var fakeElement = jasmine.createSpy(); fakeElement.fakeMethod = buscarAuditoria(); spyOn(fakeElement, "fakeMethod"); expect(fakeElement.fakeMethod()).toHaveBeenCalled() });

Y esta es la función que estoy tratando de probar en js:

 function buscarAuditoria() { if ("" !== hallazgoDto.auditoria.idRegistro && null !== hallazgoDto.auditoria.idRegistro) { var datos = {}; datos.idAuditoria = hallazgoDto.auditoria.idRegistro; popupAjax({ selectorPopup : '#popupAuditoria', urlPopup : $context + '/auditoria/cargaInicialPopup.action', dataPopup : datos, title : $i18n['i18n.auditorias.excel.detalleAuditoria'], resize : false, width : '60%', mostrarAceptar : false }); } }

Cualquier ayuda será apreciada, porque soy nuevo con jasmine, gracias de antemano.

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!