Real unit test (isolation, no children render)
Calls:
- constructor
- render
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>org.mongo.mongod</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>ProgramArguments</key> | |
| <array> |
| var mongoose = require('mongoose'); | |
| mongoose.connect('mongodb://localhost/test'); | |
| var db = mongoose.connection; | |
| db.on('error', function() { | |
| return console.error.bind(console, 'connection error: '); | |
| }); | |