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

Function getUserModel

test/document.validate.test.js:1785–1794  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1783 });
1784
1785 function getUserModel() {
1786 const userSchema = Schema({
1787 name: { type: String, required: true },
1788 age: { type: Number, required: true },
1789 rank: String
1790 });
1791
1792 const User = db.model('User', userSchema);
1793 return User;
1794 }
1795 });
1796
1797 describe('validateSync()', () => {

Callers 1

Calls 1

SchemaClass · 0.50

Tested by

no test coverage detected