Get Comments pass but not status in the application web [solved]

Hi,
I passed:


MacBook-Pro-de-Adolfo:mflix-js adolfo$ npm test -t get-comments

> server@1.0.0 test /Users/adolfo/Dropbox/CursoM220JS/mflix-js
> jest --passWithNoTests “get-comments”

Determining test suites to run…Setup Mongo Connection
(node:19940) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to MongoClient.connect.

  • PASS test/get-comments.test.js*
  • Get Comments*
  • ✓ Can fetch comments for a movie (373ms)*
  • ✓ comments should be sorted by date (161ms)*

Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 1.868s, estimated 3s
Ran all test suites matching /get-comments/i.

But I receive:
Get Comments: The return from the api was incorrect.
From de status.

Thanks.
Adolfo

Hey @Adolfo_42076

Is the application running? I just tested and got the same error by first launching the app, then opening the browser window to the app, stopped the app in the terminal, tried to run the test and got the same error.

Hi natac13,
I did the same and got the error again.

But the comments work properly on the app web:

Well @Adolfo_42076 I am not too sure what the issue could be. And I am not a java user so I would not be much more help… :disappointed:

Thanks.
I solved the problem.
I had changed the getMovieByID(id) method doing tests, but I didn’t leave it in the correct form. Now programming the next Ticket I noticed it.

1 Like