BlinkUX / sequelize-mock

A simple mock interface specifically for testing code relying on Sequelize models
https://sequelize-mock.readthedocs.io
MIT License
139 stars 73 forks source link

Docs update #101

Open officialkevinbrian opened 1 year ago

officialkevinbrian commented 1 year ago

I have updated and fixed documentation error of this part

User.$useHandler(function(query, queryOptions, done) { if (query === 'findOne') { if (queryOptions[0].where.id === 42) { // Result found, return it return User.build({ id: 42, name: 'foo' }); } else { // No results return null; } } });