Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Sep 22, 2022
1 parent f0dafea commit aded5aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/docs/validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,14 +380,17 @@ describe('validation docs', function() {
// acquit:ignore:end
});

it('Global SchemaType Validation', async function() {
it('Global SchemaType Validation rray', async function() {
// Add a custom validator to all strings
mongoose.Schema.Types.String.set('validate', v => v == null || v > 0);

const userSchema = new Schema({
name: String,
email: String
});
// acquit:ignore:start
db.deleteModel(/User/);
// acquit:ignore:end
const User = db.model('User', userSchema);

const user = new User({ name: '', email: '' });
Expand Down

0 comments on commit aded5aa

Please sign in to comment.