@sprucelabs/data-stores 28.3.268 → 28.3.270
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.
@@ -295,19 +295,19 @@ const databaseAssertUtil = {
|
|
295
295
|
name: 'first',
|
296
296
|
});
|
297
297
|
assert.isTruthy(created, 'upsertOne() should return the record it created!');
|
298
|
-
assert.isEqual(created.name, 'first');
|
298
|
+
assert.isEqual(created.name, 'first', 'upsertOne() did not create the record with the name i passed');
|
299
299
|
assert.isEqual(`${created.id}`, `${id}`, 'ids do not match!');
|
300
300
|
const upserted = yield db.upsertOne(this.collectionName, { id }, { name: 'second' });
|
301
301
|
const id2 = db.generateId();
|
302
302
|
yield db.upsertOne(this.collectionName, { id: id2 }, { name: 'second', id: id2 });
|
303
|
-
assert.isTruthy(upserted);
|
304
|
-
assert.isEqual(created.id, upserted.id);
|
305
|
-
assert.isEqual(upserted.name, 'second');
|
303
|
+
assert.isTruthy(upserted, 'upsertOne() should return the record it updated!');
|
304
|
+
assert.isEqual(created.id, upserted.id, 'upsertOne() did return the expected id!');
|
305
|
+
assert.isEqual(upserted.name, 'second', 'upsertOne() did not update name!');
|
306
306
|
const upserted2 = yield db.upsertOne(this.collectionName, { id }, { name: 'third' });
|
307
307
|
assert.isTruthy(upserted2);
|
308
|
-
assert.isEqual(upserted2.name, 'third');
|
308
|
+
assert.isEqual(upserted2.name, 'third', 'upsertOne() did not update the record!');
|
309
309
|
const match = yield db.findOne(this.collectionName, { id });
|
310
|
-
assert.isEqualDeep(match, upserted2,
|
310
|
+
assert.isEqualDeep(match, upserted2, "upsertOne() did not update the record. I tried to findOne() based on my updates and it wasn't updated!");
|
311
311
|
yield this.shutdown(db);
|
312
312
|
});
|
313
313
|
},
|
@@ -268,19 +268,19 @@ const databaseAssertUtil = {
|
|
268
268
|
name: 'first',
|
269
269
|
});
|
270
270
|
test_utils_1.assert.isTruthy(created, 'upsertOne() should return the record it created!');
|
271
|
-
test_utils_1.assert.isEqual(created.name, 'first');
|
271
|
+
test_utils_1.assert.isEqual(created.name, 'first', 'upsertOne() did not create the record with the name i passed');
|
272
272
|
test_utils_1.assert.isEqual(`${created.id}`, `${id}`, 'ids do not match!');
|
273
273
|
const upserted = await db.upsertOne(this.collectionName, { id }, { name: 'second' });
|
274
274
|
const id2 = db.generateId();
|
275
275
|
await db.upsertOne(this.collectionName, { id: id2 }, { name: 'second', id: id2 });
|
276
|
-
test_utils_1.assert.isTruthy(upserted);
|
277
|
-
test_utils_1.assert.isEqual(created.id, upserted.id);
|
278
|
-
test_utils_1.assert.isEqual(upserted.name, 'second');
|
276
|
+
test_utils_1.assert.isTruthy(upserted, 'upsertOne() should return the record it updated!');
|
277
|
+
test_utils_1.assert.isEqual(created.id, upserted.id, 'upsertOne() did return the expected id!');
|
278
|
+
test_utils_1.assert.isEqual(upserted.name, 'second', 'upsertOne() did not update name!');
|
279
279
|
const upserted2 = await db.upsertOne(this.collectionName, { id }, { name: 'third' });
|
280
280
|
test_utils_1.assert.isTruthy(upserted2);
|
281
|
-
test_utils_1.assert.isEqual(upserted2.name, 'third');
|
281
|
+
test_utils_1.assert.isEqual(upserted2.name, 'third', 'upsertOne() did not update the record!');
|
282
282
|
const match = await db.findOne(this.collectionName, { id });
|
283
|
-
test_utils_1.assert.isEqualDeep(match, upserted2,
|
283
|
+
test_utils_1.assert.isEqualDeep(match, upserted2, "upsertOne() did not update the record. I tried to findOne() based on my updates and it wasn't updated!");
|
284
284
|
await this.shutdown(db);
|
285
285
|
},
|
286
286
|
async assertCanDeleteOne(connect) {
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
"publishConfig": {
|
4
4
|
"access": "public"
|
5
5
|
},
|
6
|
-
"version": "28.3.
|
6
|
+
"version": "28.3.270",
|
7
7
|
"files": [
|
8
8
|
"build/**/*",
|
9
9
|
"!build/__tests__",
|
@@ -67,8 +67,8 @@
|
|
67
67
|
"@seald-io/nedb": "^4.0.4",
|
68
68
|
"@sprucelabs/error": "^6.0.556",
|
69
69
|
"@sprucelabs/globby": "^2.0.501",
|
70
|
-
"@sprucelabs/schema": "^30.
|
71
|
-
"@sprucelabs/spruce-skill-utils": "^31.1.
|
70
|
+
"@sprucelabs/schema": "^30.1.1",
|
71
|
+
"@sprucelabs/spruce-skill-utils": "^31.1.5",
|
72
72
|
"just-clone": "^6.2.0",
|
73
73
|
"lodash": "^4.17.21",
|
74
74
|
"mongodb": "^6.12.0"
|