We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40358bb commit 180bf95Copy full SHA for 180bf95
test/types.map.test.js
@@ -1168,14 +1168,11 @@ describe('Map', function() {
1168
let doc1 = new Test({ name: 'name1', test_map: new Map() });
1169
await doc1.save();
1170
1171
- // 1. Refresh the document from the db
1172
doc1 = await Test.findOne({ _id: doc1._id });
1173
1174
- // 2. Modify the document (add a new key in the test_map map)
1175
doc1.test_map.set('key1', []);
1176
1177
1178
- // 3. Now, the document is wrong in the db and we cannot access the test_map anymore.
1179
1180
assert.deepStrictEqual(doc1.toObject().test_map, new Map([['key1', []]]));
1181
0 commit comments