Exercise Tracker Project - Oddly Unfulfilled User Story

Something that might be worth a try:

const {ObjectId} = require('mongodb');

I have no experience with const SchemaTypes = mongoose.Schema.Types;, but I know the above method to create an ObjectId works.

Just to help you debug, this is the expected user object in full:

const expected = {
  username: 'fcc_test_1596648410971', // Obviously the numbers change
  description: 'test',
  duration: 60,
  _id: 5f29cd9e782d5f13d127b456, // Must be of type 'ObjectId'
  date: 'Mon Jan 01 1990'
}
1 Like