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

Full Core API Mock for Sequelize Object #4

Open LoveAndCoding opened 7 years ago

LoveAndCoding commented 7 years ago

The Sequelize object is not mocked out very completely yet. It's got only a select few APIs actually mocked properly. Need to define all the functions that I'm able to mock in the core functionality.


API Calls Remaining

jagged3dge commented 7 years ago

With the query queue working, could the .fn & .col methods be just no-ops? I'm thinking this would keep things simple.

LoveAndCoding commented 7 years ago

@jagged3dge A lot of these are likely to be no-ops at the end of the day since we don't actually need to do any transformations or escaping for any actual DB queries. But for each I need to go through the API and the code from Sequelize and make sure things are mimicked in a way that makes sense. I want to make sure there is as much parity as possible with Sequelize, even with stuff under the hood, whenever I can.

jagged3dge commented 7 years ago

I want to make sure there is as much parity as possible with Sequelize, even with stuff under the hood, whenever I can

Of course. For now, I've forked this and added no-ops for .col and .fn for my use. Thanks for your insight :+1: