Skip to content

Commit

Permalink
test: check if #8222 error is caught in Deno re: #9056
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Sep 5, 2022
1 parent 5045b5b commit c13f2a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 0 additions & 3 deletions test/model.populate.test.js
Expand Up @@ -3800,9 +3800,6 @@ describe('model: populate:', function() {
const l3docs = [{ name: 'level 3', level4: l4[0]._id }];
const l3 = await level3.create(l3docs).catch(err => {
console.log(err);
console.log(err.errors);
console.log(err.errors.level4);
console.log(err.errors.level4.reason);
throw err;
});

Expand Down
5 changes: 4 additions & 1 deletion test/query.test.js
Expand Up @@ -3479,7 +3479,10 @@ describe('Query', function() {
const User = db.model('Test', userSchema);

const original = await User.create({ token: 'rightToken' });
let doc = await User.findOne({ token: 'wrongToken', _bsontype: 'a' });

let doc = await User.findOne({ token: 'wrongToken', _bsontype: 'a' }).catch(err => {
console.log('Caught', err, err instanceof Error);
});
assert.ok(!doc);

doc = await User.findOne(original._id);
Expand Down

0 comments on commit c13f2a6

Please sign in to comment.