Skip to content

Commit f651afa

Browse files
committed
test: fix deno tests
1 parent 6622f67 commit f651afa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/model.discriminator.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,9 +1626,9 @@ describe('model', function() {
16261626

16271627
const post = await Post.create({});
16281628

1629-
await UserWithPost.create({ postId: post._id });
1629+
const { _id } = await UserWithPost.create({ postId: post._id });
16301630

1631-
const user = await User.findOne().populate({ path: 'post' });
1631+
const user = await User.findById(_id).populate({ path: 'post' });
16321632

16331633
assert.ok(user.postId);
16341634
});

0 commit comments

Comments
 (0)