Moved to using a real database ORM for testing

This commit is contained in:
2021-04-05 23:11:53 +10:00
parent 82bf61a88d
commit 2567ee4745
14 changed files with 668 additions and 130 deletions

View File

@@ -0,0 +1,12 @@
const sequelize = require('..');
const authors = require('./authors');
const books = require('./books');
books.belongsTo(authors, { as: 'author' }); //books now reference the authorId
sequelize.sync();
module.exports = {
authors,
books
};