@sprucelabs/data-stores 28.3.266 → 28.3.268
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.
@@ -599,8 +599,8 @@ const databaseAssertUtil = {
|
|
599
599
|
name: 'updated',
|
600
600
|
});
|
601
601
|
assert.isTruthy(updated, `updateOne needs to return the record that was updated!`);
|
602
|
-
assert.isEqual(updated.id, inserted.id);
|
603
|
-
assert.isEqual(updated.name, 'updated');
|
602
|
+
assert.isEqual(updated.id, inserted.id, "updateOne() needs to return the record that was updated! I checked the Id and it didn't match the record that was updated.");
|
603
|
+
assert.isEqual(updated.name, 'updated', 'updateOne() did not update the fields. I tried to update the name field to "updated".');
|
604
604
|
assert.isEqual(updated.isPublic, true, 'Make sure you return existing fields from updateOne()! So, the actual record.');
|
605
605
|
const match = yield db.findOne(this.collectionName, { id: updated.id });
|
606
606
|
assert.isEqualDeep(match, updated, 'The record in the database did not actually update!');
|
@@ -1445,7 +1445,7 @@ const databaseAssertUtil = {
|
|
1445
1445
|
nullField: null,
|
1446
1446
|
name: 'hey',
|
1447
1447
|
});
|
1448
|
-
assert.isTrue(created.undefinedField === null || created.undefinedfield === null, 'undefinedField should be null');
|
1448
|
+
assert.isTrue(created.undefinedField === null || created.undefinedfield === null, 'undefinedField should be null (undefined values should be stored as null)');
|
1449
1449
|
assert.isTrue(created.nullField === null || created.nullfield === null, 'nullField should be null');
|
1450
1450
|
const matchedUndefined = yield db.findOne(this.collectionName, {
|
1451
1451
|
undefinedField: undefined,
|
@@ -544,8 +544,8 @@ const databaseAssertUtil = {
|
|
544
544
|
name: 'updated',
|
545
545
|
});
|
546
546
|
test_utils_1.assert.isTruthy(updated, `updateOne needs to return the record that was updated!`);
|
547
|
-
test_utils_1.assert.isEqual(updated.id, inserted.id);
|
548
|
-
test_utils_1.assert.isEqual(updated.name, 'updated');
|
547
|
+
test_utils_1.assert.isEqual(updated.id, inserted.id, "updateOne() needs to return the record that was updated! I checked the Id and it didn't match the record that was updated.");
|
548
|
+
test_utils_1.assert.isEqual(updated.name, 'updated', 'updateOne() did not update the fields. I tried to update the name field to "updated".');
|
549
549
|
test_utils_1.assert.isEqual(updated.isPublic, true, 'Make sure you return existing fields from updateOne()! So, the actual record.');
|
550
550
|
const match = await db.findOne(this.collectionName, { id: updated.id });
|
551
551
|
test_utils_1.assert.isEqualDeep(match, updated, 'The record in the database did not actually update!');
|
@@ -1324,7 +1324,7 @@ const databaseAssertUtil = {
|
|
1324
1324
|
nullField: null,
|
1325
1325
|
name: 'hey',
|
1326
1326
|
});
|
1327
|
-
test_utils_1.assert.isTrue(created.undefinedField === null || created.undefinedfield === null, 'undefinedField should be null');
|
1327
|
+
test_utils_1.assert.isTrue(created.undefinedField === null || created.undefinedfield === null, 'undefinedField should be null (undefined values should be stored as null)');
|
1328
1328
|
test_utils_1.assert.isTrue(created.nullField === null || created.nullfield === null, 'nullField should be null');
|
1329
1329
|
const matchedUndefined = await db.findOne(this.collectionName, {
|
1330
1330
|
undefinedField: undefined,
|