Node.js module to setup your test database using fixtures in a breeze. Inspired by Rails fixtures.
- Only supports
sequelizeORM at the moment.
- I haven't tested many-to-many relationships for now but I will as soon as possible.
npm install fixer
var fixer = ;/*** @param* @param* name and value is the Sequelize model*/;
Example fixtures (in coffeescript):
module.exports =oli:first_name: 'Olivier'last_name: 'Lalonde'email: 'email@example.com'school: 'NYU'mark:first_name: 'Mark'last_name: 'Zuckerberg'email: 'firstname.lastname@example.org'school: 'Harvard'
module.exports ='NYU':name: 'New York University'email: 'email@example.com''Harvard':name: 'University of Harvard'email: 'firstname.lastname@example.org'
You can reference other fixtures by their key. For example,