* Setup.
(schema)
| 18 | */ |
| 19 | |
| 20 | function 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. |
no outgoing calls
no test coverage detected