Skip to content

Commit 804d629

Browse files
Merge pull request #2670 from orgads/e2e-mongoose-9
chore(test): adapt mongoose test to mongoose v9
2 parents 25dae6d + 17dcb7c commit 804d629

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/e2e/mongoose.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('Mongoose', () => {
5858
...createDto,
5959
name: 'Nest',
6060
age: 5,
61-
kitten: [kitten._id as string],
61+
kitten: [kitten._id.toString()],
6262
};
6363

6464
const parent = await new Promise<string>((resolve) => {

tests/src/cats/schemas/cat.schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Document, Types } from 'mongoose';
22
import { Prop, Schema, SchemaFactory } from '../../../../lib';
33

44
@Schema()
5-
export class Cat extends Document {
5+
export class Cat extends Document<Types.ObjectId> {
66
@Prop()
77
name: string;
88

0 commit comments

Comments
 (0)