heroku/dorante — pull request #3 by jackfranklin (2014-12-11 11:09:29+00:00)
Title: Use JaySchema to validate factories and custom properties

We found this useful for making sure our factories are correct, and saves a step when debugging our E2E tests.

Now, whenever `factory` is called, the object that it generates is
validated against the schema using the JaySchema library. This means if
you pass invalid data, it will throw an `InvalidFactory` error, but only
if `options.validateProperties` is set to true. This can be done in the
constructor:

```
new Dorante(schema, { validateProperties: true });
```

Or just with the instance:

```
dorante.options.validateProperties = true;
```

Thoughts, feedback and so on welcome! Thanks :)