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

Function TestDoc

test/types.documentarray.test.js:20–42  ·  view source on GitHub ↗

* Setup.

(schema)

Source from the content-addressed store, hash-verified

18 */
19
20function TestDoc(schema) {
21 var Subdocument = function() {
22 EmbeddedDocument.call(this, {}, new DocumentArray);
23 };
24
25 /**
26 * Inherits from EmbeddedDocument.
27 */
28
29 Subdocument.prototype.__proto__ = EmbeddedDocument.prototype;
30
31 /**
32 * Set schema.
33 */
34
35 var SubSchema = new Schema({
36 title: {type: String}
37 });
38
39 Subdocument.prototype.$__setSchema(schema || SubSchema);
40
41 return Subdocument;
42}
43
44/**
45 * Test.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected