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

Function getModel

test/types.documentarray.test.js:1472–1477  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1470
1471 describe('document array reassigned with existing subdocs', function() {
1472 function getModel() {
1473 const schema = new mongoose.Schema({
1474 items: [{ name: String, qty: Number, tags: [{ label: String }] }]
1475 });
1476 return db.model('Test', schema);
1477 }
1478
1479 async function createDoc(Test) {
1480 return Test.create({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected