MongoDB and Mongoose - Create Many Records with model.create() - Test Timeout

timeout error

My code so far
I just copied the hint’s array…

const arrayOfPeople = [
  { name: "Frankie", age: 74, favoriteFoods: ["Del Taco"] },
  { name: "Sol", age: 76, favoriteFoods: ["roast chicken"] },
  { name: "Robert", age: 78, favoriteFoods: ["wine"] }
];

const createManyPeople = function(arrayOfPeople, done){
  Person.create(arrayOfPeople, (err, people) => {
    if (err) return console.error(err);
    done(null, people);
  });
};

timeout

// running tests
Creating many db items at once should succeed (Test timed out)
// tests completed

Challenge: MongoDB and Mongoose - Create Many Records with model.create()

Link to the challenge:
https://www.freecodecamp.org/learn/apis-and-microservices/mongodb-and-mongoose/create-many-records-with-model.create

Umm, I submitted the solution multiple times, and it passed. Tried it again, and it would fail more than pass. Im just confused now. LoL.
:crazy_face:

1 Like