Is the DB the same as in M220J?

I’m taking two courses. This one and for Java developers. Is their databases are the same? I haven’t any issues with Java, but stuck with projection.test.js. and I’m using the database that I’ve restored from data contained in Java course for both of them.

They are using the same dataset, but the dataset was updated and is different for current runs of M220. Could you share what you are stuck on?

Error: expect(received).toEqual(expected)

Expected value to equal:
2788
Received:
0
Expected :2788
Actual :0

  15 |     const countriesList = ["Russia", "Japan", "Mexico"]
  16 |     const movies = await MoviesDAO.getMoviesByCountry(countriesList)
> 17 |     expect(movies.length).toEqual(2788)
     |                           ^
  18 |     movies.map(movie => {
  19 |       const movieKeys = Object.keys(movie).sort()
  20 |       const expectedKeys = ["_id", "title"]

And the native query:
db.movies.find({‘countries’: { $all: [“Russia”, “Japan”, “Mexico”]}}, {’_id’: 1, ‘title’: 1})
Fetched 0 record(s) in 194ms

Ok, it’s expecting the correct number of documents, which points to the implementation.

Remember that the key is called countries

Yes, but see the native query below. It gave me the same result as a code and it’s not match to expected value.

Spoilers redacted!

Remember, $all means all those values must be present. $in will be satisfied if at least one of those values is present.

Oh)) Thank you :flushed: