BlinkUX/sequelize-mock

Make it possible for instance methods to fail

jagged3dge opened this issue · 1 comments

Currently, instance methods work as advertised. When testing, we need to also test when the methods would fail: for example myMockInstance.update could fail most possibly due to validation error(s).

How might we make instance methods throw an error?
Maybe call the underlying queryInterface after performing the appropriate mocking magic?

It pays to read the docs. Found the methods: $addValidationError, $removeValidationError, $clearValidationErrors available on any mock instance. Closing as silly.