Skip to content

Commit

Permalink
fix id generation
Browse files Browse the repository at this point in the history
  • Loading branch information
IslandRhythms committed Feb 12, 2024
1 parent 491be54 commit eb449c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/model.hydrate.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ describe('model', function() {
const User = db.model('UserTestHydrate', userSchema);

Check failure on line 111 in test/model.hydrate.test.js

View workflow job for this annotation

GitHub Actions / Lint JS-Files

'User' is assigned a value but never used
const Company = db.model('CompanyTestHyrdrate', companySchema);

const users = [{ _id: new Schema.ObjectId(), name: 'Val'}];
const company = { _id: new Schema.ObjectId(), name: 'Booster', users: [users[0]] };
const users = [{ _id: new mongoose.Types.ObjectId(), name: 'Val'}];

Check failure on line 114 in test/model.hydrate.test.js

View workflow job for this annotation

GitHub Actions / Lint JS-Files

A space is required before '}'
const company = { _id: new mongoose.Types.ObjectId(), name: 'Booster', users: [users[0]] };

const C = Company.hydrate(company, null, { hydratedPopulatedDocs: true });
assert.equal(C.users[0].name, 'Val');
Expand Down

0 comments on commit eb449c4

Please sign in to comment.