monastery 1.28.1 → 1.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +30 -4
- package/docs/Gemfile +8 -18
- package/docs/_config.yml +1 -4
- package/lib/index.js +0 -1
- package/lib/model-crud.js +32 -16
- package/lib/model-validate.js +11 -10
- package/lib/model.js +12 -4
- package/lib/rules.js +21 -29
- package/lib/util.js +13 -7
- package/package.json +17 -16
- package/plugins/images/index.js +4 -4
- package/test/blacklisting.js +4 -8
- package/test/crud.js +28 -31
- package/test/model.js +47 -51
- package/test/monk.js +4 -4
- package/test/plugin-images.js +400 -390
- package/test/populate.js +15 -18
- package/test/util.js +8 -8
- package/test/validate.js +50 -43
- package/test/virtuals.js +2 -4
package/test/blacklisting.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module.exports = function(monastery, opendb) {
|
|
2
2
|
|
|
3
|
-
test('Find blacklisting', async (
|
|
3
|
+
test('Find blacklisting', async () => {
|
|
4
4
|
// Setup
|
|
5
5
|
let db = (await opendb(null)).db
|
|
6
6
|
let bird = db.model('bird', {
|
|
@@ -150,10 +150,9 @@ module.exports = function(monastery, opendb) {
|
|
|
150
150
|
})
|
|
151
151
|
|
|
152
152
|
db.close()
|
|
153
|
-
done()
|
|
154
153
|
})
|
|
155
154
|
|
|
156
|
-
test('Find blacklisting (default fields)', async (
|
|
155
|
+
test('Find blacklisting (default fields)', async () => {
|
|
157
156
|
// Setup
|
|
158
157
|
let db = (await opendb(null)).db
|
|
159
158
|
let user = db.model('user', {
|
|
@@ -222,10 +221,9 @@ module.exports = function(monastery, opendb) {
|
|
|
222
221
|
})
|
|
223
222
|
|
|
224
223
|
db.close()
|
|
225
|
-
done()
|
|
226
224
|
})
|
|
227
225
|
|
|
228
|
-
test('Find blacklisting (populate)', async (
|
|
226
|
+
test('Find blacklisting (populate)', async () => {
|
|
229
227
|
// Setup
|
|
230
228
|
let db = (await opendb(null)).db
|
|
231
229
|
let bird = db.model('bird', {
|
|
@@ -305,10 +303,9 @@ module.exports = function(monastery, opendb) {
|
|
|
305
303
|
})
|
|
306
304
|
|
|
307
305
|
db.close()
|
|
308
|
-
done()
|
|
309
306
|
})
|
|
310
307
|
|
|
311
|
-
test('Insert/update blacklisting (validate)', async (
|
|
308
|
+
test('Insert/update blacklisting (validate)', async () => {
|
|
312
309
|
// Setup
|
|
313
310
|
let db = (await opendb(null)).db
|
|
314
311
|
let user = db.model('user', {
|
|
@@ -406,7 +403,6 @@ module.exports = function(monastery, opendb) {
|
|
|
406
403
|
}
|
|
407
404
|
})
|
|
408
405
|
db.close()
|
|
409
|
-
done()
|
|
410
406
|
})
|
|
411
407
|
|
|
412
408
|
}
|
package/test/crud.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
let util = require('../lib/util')
|
|
1
|
+
// let util = require('../lib/util')
|
|
2
2
|
|
|
3
3
|
module.exports = function(monastery, opendb) {
|
|
4
4
|
|
|
5
|
-
test('Basic operator calls', async (
|
|
5
|
+
test('Basic operator calls', async () => {
|
|
6
6
|
let db = (await opendb(null)).db
|
|
7
7
|
let user = db.model('user', {
|
|
8
8
|
fields: { name: { type: 'string' }},
|
|
@@ -53,13 +53,14 @@ module.exports = function(monastery, opendb) {
|
|
|
53
53
|
expect(find6).toEqual({ _id: inserted2[0]._id, name: 'Martin Luther1' })
|
|
54
54
|
|
|
55
55
|
// Missing parameters
|
|
56
|
-
await expect(user.find()).rejects.toThrow(
|
|
57
|
-
await expect(user.find(undefined)).rejects.toThrow(
|
|
58
|
-
await expect(user.find({})).rejects.toThrow(
|
|
59
|
-
await expect(user.find({ query: null })).rejects.toThrow(
|
|
60
|
-
await expect(user.find({ query: undefined })).rejects.toThrow(
|
|
61
|
-
await expect(user.find({ query: { _id: undefined }}))
|
|
62
|
-
|
|
56
|
+
await expect(user.find()).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
57
|
+
await expect(user.find(undefined)).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
58
|
+
await expect(user.find({})).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
59
|
+
await expect(user.find({ query: null })).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
60
|
+
await expect(user.find({ query: undefined })).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
61
|
+
await expect(user.find({ query: { _id: undefined }}))
|
|
62
|
+
.rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
63
|
+
await expect(user.find(1)).rejects.toThrow('Please pass an object or MongoId to options.query')
|
|
63
64
|
|
|
64
65
|
// Bad MongoID
|
|
65
66
|
await expect(user.find({ query: '' })).resolves.toEqual(null)
|
|
@@ -89,10 +90,10 @@ module.exports = function(monastery, opendb) {
|
|
|
89
90
|
|
|
90
91
|
// Update (no/empty data object)
|
|
91
92
|
await expect(user.update({ query: inserted._id, data: {}}))
|
|
92
|
-
.rejects.toThrow(
|
|
93
|
+
.rejects.toThrow('No valid data passed to user.update()')
|
|
93
94
|
|
|
94
95
|
await expect(user.update({ query: inserted._id }))
|
|
95
|
-
.rejects.toThrow(
|
|
96
|
+
.rejects.toThrow('No valid data passed to user.update()')
|
|
96
97
|
|
|
97
98
|
// Update (no/empty data object, but has update operators
|
|
98
99
|
await expect(user.update({ query: inserted._id, $set: { name: 'bruce' }}))
|
|
@@ -114,7 +115,7 @@ module.exports = function(monastery, opendb) {
|
|
|
114
115
|
expect(beforeValidateHookCalled).toEqual(false)
|
|
115
116
|
|
|
116
117
|
// Update multiple
|
|
117
|
-
|
|
118
|
+
await user.update({
|
|
118
119
|
query: { _id: { $in: [inserted2[0]._id, inserted2[1]._id] }},
|
|
119
120
|
data: { name: 'Martin Luther3' },
|
|
120
121
|
multi: true
|
|
@@ -137,10 +138,9 @@ module.exports = function(monastery, opendb) {
|
|
|
137
138
|
expect(remove.result).toEqual({ n: 1, ok: 1 })
|
|
138
139
|
|
|
139
140
|
db.close()
|
|
140
|
-
done()
|
|
141
141
|
})
|
|
142
142
|
|
|
143
|
-
test('Insert defaults', async (
|
|
143
|
+
test('Insert defaults', async () => {
|
|
144
144
|
let db = (await opendb(null, { defaultObjects: true, serverSelectionTimeoutMS: 2000 })).db
|
|
145
145
|
let db2 = (await opendb(null, { useMilliseconds: true, serverSelectionTimeoutMS: 2000 })).db
|
|
146
146
|
let user = db.model('user', { fields: {
|
|
@@ -192,10 +192,9 @@ module.exports = function(monastery, opendb) {
|
|
|
192
192
|
|
|
193
193
|
db.close()
|
|
194
194
|
db2.close()
|
|
195
|
-
done()
|
|
196
195
|
})
|
|
197
196
|
|
|
198
|
-
test('update defaults', async (
|
|
197
|
+
test('update defaults', async () => {
|
|
199
198
|
let db = (await opendb(null, { useMilliseconds: true, serverSelectionTimeoutMS: 2000 })).db
|
|
200
199
|
let user = db.model('user', {
|
|
201
200
|
fields: {
|
|
@@ -236,7 +235,7 @@ module.exports = function(monastery, opendb) {
|
|
|
236
235
|
query: inserted._id,
|
|
237
236
|
data: {},
|
|
238
237
|
timestamps: false
|
|
239
|
-
})).rejects.toThrow(
|
|
238
|
+
})).rejects.toThrow('No valid data passed to user.update()')
|
|
240
239
|
|
|
241
240
|
// UpdatedAt override (wont work)
|
|
242
241
|
let updated4 = await user.update({
|
|
@@ -254,12 +253,11 @@ module.exports = function(monastery, opendb) {
|
|
|
254
253
|
expect(updated5.updatedAt).toEqual(1)
|
|
255
254
|
|
|
256
255
|
db.close()
|
|
257
|
-
done()
|
|
258
256
|
})
|
|
259
257
|
|
|
260
|
-
test('Insert with id casting', async (
|
|
258
|
+
test('Insert with id casting', async () => {
|
|
261
259
|
let db = (await opendb(null)).db
|
|
262
|
-
|
|
260
|
+
db.model('company', { fields: {
|
|
263
261
|
name: { type: 'string' }
|
|
264
262
|
}})
|
|
265
263
|
let user = db.model('user', { fields: {
|
|
@@ -279,10 +277,9 @@ module.exports = function(monastery, opendb) {
|
|
|
279
277
|
})
|
|
280
278
|
|
|
281
279
|
db.close()
|
|
282
|
-
done()
|
|
283
280
|
})
|
|
284
281
|
|
|
285
|
-
test('Find default field population', async (
|
|
282
|
+
test('Find default field population', async () => {
|
|
286
283
|
let db = (await opendb(null)).db
|
|
287
284
|
let user = db.model('user', {
|
|
288
285
|
fields: {
|
|
@@ -308,7 +305,7 @@ module.exports = function(monastery, opendb) {
|
|
|
308
305
|
],
|
|
309
306
|
pet: { dog: inserted._id }
|
|
310
307
|
}})
|
|
311
|
-
|
|
308
|
+
await dog.update({
|
|
312
309
|
query: inserted._id,
|
|
313
310
|
data: { user: inserted2._id }
|
|
314
311
|
})
|
|
@@ -370,10 +367,9 @@ module.exports = function(monastery, opendb) {
|
|
|
370
367
|
})
|
|
371
368
|
|
|
372
369
|
db.close()
|
|
373
|
-
done()
|
|
374
370
|
})
|
|
375
371
|
|
|
376
|
-
test('Hooks', async (
|
|
372
|
+
test('Hooks', async () => {
|
|
377
373
|
let db = (await opendb(null)).db
|
|
378
374
|
let user = db.model('user', {
|
|
379
375
|
fields: {
|
|
@@ -412,8 +408,8 @@ module.exports = function(monastery, opendb) {
|
|
|
412
408
|
let userDoc = await user.insert({ data: { first: 'Martin', last: 'Luther' }})
|
|
413
409
|
|
|
414
410
|
// Catch insert (a)synchronous errors thrown in function or through `next(err)`
|
|
415
|
-
await expect(user.insert({ data: { first: '' } })).rejects.toThrow(
|
|
416
|
-
await expect(user.insert({ data: { first: 'Martin' } })).rejects.toThrow(
|
|
411
|
+
await expect(user.insert({ data: { first: '' } })).rejects.toThrow('beforeInsert error 1..')
|
|
412
|
+
await expect(user.insert({ data: { first: 'Martin' } })).rejects.toThrow('beforeInsert error 2..')
|
|
417
413
|
await expect(user.insert({ data: { first: 'Martin', last: 'Luther' } })).resolves.toEqual({
|
|
418
414
|
_id: expect.any(Object),
|
|
419
415
|
first: 'Martin',
|
|
@@ -421,15 +417,17 @@ module.exports = function(monastery, opendb) {
|
|
|
421
417
|
})
|
|
422
418
|
|
|
423
419
|
// Catch update (a)synchronous errors thrown in function or through `next(err)`
|
|
424
|
-
await expect(user.update({ query: userDoc._id, data: { first: '' } }))
|
|
425
|
-
|
|
420
|
+
await expect(user.update({ query: userDoc._id, data: { first: '' } }))
|
|
421
|
+
.rejects.toThrow('beforeUpdate error 1..')
|
|
422
|
+
await expect(user.update({ query: userDoc._id, data: { first: 'Martin' } }))
|
|
423
|
+
.rejects.toThrow('beforeUpdate error 2..')
|
|
426
424
|
await expect(user.update({ query: userDoc._id, data: { first: 'Martin', last: 'Luther' } })).resolves.toEqual({
|
|
427
425
|
first: 'Martin',
|
|
428
426
|
last: 'Luther'
|
|
429
427
|
})
|
|
430
428
|
|
|
431
429
|
// Catch remove synchronous errors through `next(err)`
|
|
432
|
-
await expect(user.remove({ query: userDoc._id })).rejects.toThrow(
|
|
430
|
+
await expect(user.remove({ query: userDoc._id })).rejects.toThrow('beforeRemove error..')
|
|
433
431
|
|
|
434
432
|
// After find continues series
|
|
435
433
|
await expect(user.find({ query: userDoc._id })).resolves.toEqual({
|
|
@@ -439,7 +437,6 @@ module.exports = function(monastery, opendb) {
|
|
|
439
437
|
})
|
|
440
438
|
|
|
441
439
|
db.close()
|
|
442
|
-
done()
|
|
443
440
|
})
|
|
444
441
|
|
|
445
442
|
}
|
package/test/model.js
CHANGED
|
@@ -19,13 +19,13 @@ module.exports = function(monastery, opendb) {
|
|
|
19
19
|
insertOnly: true,
|
|
20
20
|
isInteger: true,
|
|
21
21
|
timestampField: true,
|
|
22
|
-
type:
|
|
22
|
+
type: 'integer',
|
|
23
23
|
},
|
|
24
24
|
updatedAt: {
|
|
25
25
|
default: expect.any(Function),
|
|
26
26
|
isInteger: true,
|
|
27
27
|
timestampField: true,
|
|
28
|
-
type:
|
|
28
|
+
type: 'integer',
|
|
29
29
|
},
|
|
30
30
|
})
|
|
31
31
|
|
|
@@ -79,13 +79,13 @@ module.exports = function(monastery, opendb) {
|
|
|
79
79
|
insertOnly: true,
|
|
80
80
|
isInteger: true,
|
|
81
81
|
timestampField: true,
|
|
82
|
-
type:
|
|
82
|
+
type: 'integer'
|
|
83
83
|
},
|
|
84
84
|
updatedAt: {
|
|
85
85
|
default: expect.any(Function),
|
|
86
86
|
isInteger: true,
|
|
87
87
|
timestampField: true,
|
|
88
|
-
type:
|
|
88
|
+
type: 'integer'
|
|
89
89
|
}
|
|
90
90
|
})
|
|
91
91
|
})
|
|
@@ -115,7 +115,7 @@ module.exports = function(monastery, opendb) {
|
|
|
115
115
|
})
|
|
116
116
|
})
|
|
117
117
|
|
|
118
|
-
test('Model indexes', async (
|
|
118
|
+
test('Model indexes', async () => {
|
|
119
119
|
// Need to test different types of indexes
|
|
120
120
|
let db = (await opendb(null)).db
|
|
121
121
|
|
|
@@ -129,25 +129,24 @@ module.exports = function(monastery, opendb) {
|
|
|
129
129
|
|
|
130
130
|
// Unique & text index (after model initialisation, in serial)
|
|
131
131
|
let userIndexRawModel = db.model('userIndexRaw', {})
|
|
132
|
-
|
|
132
|
+
await userIndexRawModel._setupIndexes({
|
|
133
133
|
email: { type: 'string', index: 'unique' },
|
|
134
134
|
})
|
|
135
|
-
|
|
135
|
+
await userIndexRawModel._setupIndexes({
|
|
136
136
|
name: { type: 'string', index: 'text' },
|
|
137
137
|
})
|
|
138
|
-
await
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
])
|
|
138
|
+
let indexes = await db._db.collection('userIndexRaw').indexes()
|
|
139
|
+
expect(indexes[0]).toMatchObject({ v: 2, key: { _id: 1 }, name: '_id_' })
|
|
140
|
+
expect(indexes[1]).toMatchObject({ v: 2, unique: true, key: { email: 1 }, name: 'email_1' })
|
|
141
|
+
expect(indexes[2]).toMatchObject({
|
|
142
|
+
v: 2,
|
|
143
|
+
key: { _fts: 'text', _ftsx: 1 },
|
|
144
|
+
name: 'text',
|
|
145
|
+
weights: { name: 1 },
|
|
146
|
+
default_language: 'english',
|
|
147
|
+
language_override: 'language',
|
|
148
|
+
textIndexVersion: 3
|
|
149
|
+
})
|
|
151
150
|
|
|
152
151
|
// Unique & text index
|
|
153
152
|
let userIndexModel = await db.model('userIndex', {
|
|
@@ -157,42 +156,41 @@ module.exports = function(monastery, opendb) {
|
|
|
157
156
|
name: { type: 'string', index: 'text' },
|
|
158
157
|
}
|
|
159
158
|
})
|
|
160
|
-
await expect(db._db.collection('userIndex').indexes()).resolves.toEqual([
|
|
161
|
-
{ v: 2, key: { _id: 1 }, name: '_id_' },
|
|
162
|
-
{ v: 2, unique: true, key: { email: 1 }, name: 'email_1' },
|
|
163
|
-
{
|
|
164
|
-
v: 2,
|
|
165
|
-
key: { _fts: 'text', _ftsx: 1 },
|
|
166
|
-
name: 'text',
|
|
167
|
-
weights: { name: 1 },
|
|
168
|
-
default_language: 'english',
|
|
169
|
-
language_override: 'language',
|
|
170
|
-
textIndexVersion: 3
|
|
171
|
-
}
|
|
172
|
-
])
|
|
173
159
|
|
|
174
|
-
|
|
160
|
+
let indexes2 = await db._db.collection('userIndex').indexes()
|
|
161
|
+
expect(indexes2[0]).toMatchObject({ v: 2, key: { _id: 1 }, name: '_id_' })
|
|
162
|
+
expect(indexes2[1]).toMatchObject({ v: 2, unique: true, key: { email: 1 }, name: 'email_1' })
|
|
163
|
+
expect(indexes2[2]).toMatchObject({
|
|
164
|
+
v: 2,
|
|
165
|
+
key: { _fts: 'text', _ftsx: 1 },
|
|
166
|
+
name: 'text',
|
|
167
|
+
weights: { name: 1 },
|
|
168
|
+
default_language: 'english',
|
|
169
|
+
language_override: 'language',
|
|
170
|
+
textIndexVersion: 3
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
// No text index change error, i.e. new Error('Index with name: text already exists with different options')
|
|
175
174
|
await expect(userIndexModel._setupIndexes({
|
|
176
175
|
name: { type: 'string', index: 'text' },
|
|
177
176
|
name2: { type: 'string', index: 'text' }
|
|
178
177
|
})).resolves.toEqual([{
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
'key': { 'name': 'text', 'name2': 'text' },
|
|
179
|
+
'name': 'text',
|
|
181
180
|
}])
|
|
182
181
|
|
|
183
182
|
// Text index on a different model
|
|
184
183
|
await expect(userIndexRawModel._setupIndexes({
|
|
185
184
|
name2: { type: 'string', index: 'text' }
|
|
186
185
|
})).resolves.toEqual([{
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
'key': {'name2': 'text'},
|
|
187
|
+
'name': 'text',
|
|
189
188
|
}])
|
|
190
189
|
|
|
191
190
|
db.close()
|
|
192
|
-
done()
|
|
193
191
|
})
|
|
194
192
|
|
|
195
|
-
test('Model 2dsphere indexes', async (
|
|
193
|
+
test('Model 2dsphere indexes', async () => {
|
|
196
194
|
// Setup. The tested model needs to be unique as race condition issue arises when the same model
|
|
197
195
|
// with text indexes are setup at the same time
|
|
198
196
|
let db = (await opendb(null)).db
|
|
@@ -218,10 +216,10 @@ module.exports = function(monastery, opendb) {
|
|
|
218
216
|
coordinates: expect.any(Array),
|
|
219
217
|
schema: {
|
|
220
218
|
default: undefined,
|
|
221
|
-
index:
|
|
219
|
+
index: '2dsphere',
|
|
222
220
|
isObject: true,
|
|
223
221
|
nullObject: undefined,
|
|
224
|
-
type:
|
|
222
|
+
type: 'object'
|
|
225
223
|
}
|
|
226
224
|
})
|
|
227
225
|
expect(db.user3.fields.location2).toEqual({
|
|
@@ -229,10 +227,10 @@ module.exports = function(monastery, opendb) {
|
|
|
229
227
|
coordinates: expect.any(Array),
|
|
230
228
|
schema: {
|
|
231
229
|
default: undefined,
|
|
232
|
-
index: { type:
|
|
230
|
+
index: { type: '2dsphere' },
|
|
233
231
|
isObject: true,
|
|
234
232
|
nullObject: undefined,
|
|
235
|
-
type:
|
|
233
|
+
type: 'object'
|
|
236
234
|
}
|
|
237
235
|
})
|
|
238
236
|
|
|
@@ -245,17 +243,16 @@ module.exports = function(monastery, opendb) {
|
|
|
245
243
|
_id: expect.any(Object),
|
|
246
244
|
location: {
|
|
247
245
|
coordinates: [172.5880385, -43.3311608],
|
|
248
|
-
type:
|
|
246
|
+
type: 'Point'
|
|
249
247
|
},
|
|
250
248
|
})
|
|
251
249
|
|
|
252
250
|
db.close()
|
|
253
|
-
done()
|
|
254
251
|
})
|
|
255
252
|
|
|
256
|
-
test('Model findBL, findBLProject', async (
|
|
253
|
+
test('Model findBL, findBLProject', async () => {
|
|
257
254
|
let db = (await opendb(null)).db
|
|
258
|
-
|
|
255
|
+
db.model('bird', { fields: {
|
|
259
256
|
name: { type: 'string' }
|
|
260
257
|
}})
|
|
261
258
|
let user = db.model('user', {
|
|
@@ -356,8 +353,8 @@ module.exports = function(monastery, opendb) {
|
|
|
356
353
|
'hiddenDeepModel': 0,
|
|
357
354
|
'hiddenDeepModels': 0,
|
|
358
355
|
// Deep model blacklists
|
|
359
|
-
|
|
360
|
-
|
|
356
|
+
'deepModel.myBird.password': 0,
|
|
357
|
+
'deepModel2.myBird.password': 0
|
|
361
358
|
})
|
|
362
359
|
|
|
363
360
|
// Test whitelisting
|
|
@@ -416,7 +413,6 @@ module.exports = function(monastery, opendb) {
|
|
|
416
413
|
})
|
|
417
414
|
|
|
418
415
|
db.close()
|
|
419
|
-
done()
|
|
420
416
|
})
|
|
421
417
|
|
|
422
418
|
}
|
package/test/monk.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module.exports = function(monastery, opendb) {
|
|
2
2
|
|
|
3
|
-
test('Monk confilicts', async (
|
|
3
|
+
test('Monk confilicts', async () => {
|
|
4
4
|
// Setup
|
|
5
5
|
let db = (await opendb(false)).db
|
|
6
6
|
let monkdb = require('monk')(':badconnection', () => {})
|
|
7
|
-
|
|
7
|
+
db.model('user', {})
|
|
8
8
|
let modelNamedConnected = db.model('connected', {})
|
|
9
9
|
|
|
10
10
|
// Any of our monastery properties already exist on the manager?
|
|
@@ -19,8 +19,8 @@ module.exports = function(monastery, opendb) {
|
|
|
19
19
|
expect(db.connected).toEqual(db.connected)
|
|
20
20
|
expect(db.model.connected).toEqual(modelNamedConnected)
|
|
21
21
|
|
|
22
|
-
// Close test since monk(uri) awaits upoin a connection
|
|
23
|
-
done()
|
|
22
|
+
// Close test since monk(uri) awaits upoin a connection (Update, done not needed in latest jest)
|
|
23
|
+
// done()
|
|
24
24
|
})
|
|
25
25
|
|
|
26
26
|
test('Monastery connect with promise', (done) => {
|