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

2.2K
Views
Kotlin MockK: io.mockk.MockKException: no se encontró respuesta para

Este es mi fragmento de código:

 @Test fun `request should return anon id if query param present`(@MockK(relaxed = true) req: ServerRequest)

Estoy usando JUnit5 (Júpiter). La excepción que tengo es:

io.mockk.MockKException: no answer found for: ServerRequest(#1).cookies()

Esto es extraño porque si entendí correctamente, mi instancia de relaxed siempre debería tener algún valor .

¿Por qué no en mi caso?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Descubrí mientras escribía la pregunta que hay otra alternativa para especificar relajado, a través de @RelaxedMockK . E imagina mi sorpresa, funciona:

 @Test fun `request should return anon id if query param present`(@RelaxedMockK req: ServerRequest) {
over 4 years ago · Santiago Trujillo Report
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!