MCPcopy Create free account
hub / github.com/Automattic/mongoose / createDoc

Function createDoc

test/types.documentarray.test.js:1479–1487  ·  view source on GitHub ↗
(Test)

Source from the content-addressed store, hash-verified

1477 }
1478
1479 async function createDoc(Test) {
1480 return Test.create({
1481 items: [
1482 { name: 'apple', qty: 1, tags: [{ label: 'a1' }, { label: 'a2' }] },
1483 { name: 'pear', qty: 2, tags: [{ label: 'p1' }] },
1484 { name: 'fig', qty: 3, tags: [] }
1485 ]
1486 });
1487 }
1488
1489 it('tracks changes under the new index after assigning reordered plain objects', async function() {
1490 const Test = getModel();

Callers 1

Calls 1

createMethod · 0.80

Tested by

no test coverage detected