deno.land / x / mongoose@6.7.5 / test / schema.number.test.js

schema.number.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';
const start = require('./common');
const mongoose = start.mongoose;const Schema = mongoose.Schema;
describe('SchemaNumber', function() { it('allows 0 with required: true and ref set (gh-11912)', async function() { const schema = new Schema({ x: { type: Number, required: true, ref: 'Foo' } });
await new Promise((resolve, reject) => { schema.path('x').doValidate(0, err => { if (err != null) { return reject(err); } resolve(); }); }); });});
mongoose

Version Info

Tagged at
a year ago