sequelize-mock
sequelize-mock copied to clipboard
Full Core API Mock for Sequelize Object
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
- [x]
.getDialect - [x]
.getQueryInterface - [X]
.define - [x]
.model - [x]
.isDefined - [x]
.import - [X]
.query - [ ]
.set - [ ]
.escape - [ ]
.createSchema - [ ]
.showAllSchemas - [ ]
.dropSchema - [ ]
.dropAllSchemas - [x]
.sync - [ ]
.truncate - [ ]
.drop - [x]
.authenticate - [ ]
.fn - [ ]
.col - [ ]
.cast - [X]
.literal - [ ]
.and - [ ]
.or - [ ]
.json - [ ]
.where - [X]
.transaction
With the query queue working, could the .fn & .col methods be just no-ops? I'm thinking this would keep things simple.
@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.
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: