These are chat archives for Automattic/mongoose

Jun 2015
Valeri Karpov
Jun 16 2015 17:18
@eloytoro mongodb server doesn't really support a notion of foreign key constraints, so mongoose can't really do inter-collection validation in any sane way. For example, unique isn't actually mongoose validation, mongoose just creates a unique index on the mongodb server and the server enforces uniqueness
@EricMcRay you can also use custom validators and use something like to attach HTTP status codes to returned errors
@nottinhill unit testing is pretty straightforward in JS, numerous tools like sinon and strawman to generate stubs, and writing your own stubs is trivial. Nowadays I find API level integration tests to be a better fit for the kind of dev work I do though
Erinç Fırtına
Jun 16 2015 17:27
@vkarpov15 i did not know Boom. Looks like its a very handy module. Thanks for that!