Skip to content

Instantly share code, notes, and snippets.

@kianaditya
Last active July 1, 2020 11:21
Show Gist options
  • Save kianaditya/e033694bd8b422666d6189bb7f892dbb to your computer and use it in GitHub Desktop.
Save kianaditya/e033694bd8b422666d6189bb7f892dbb to your computer and use it in GitHub Desktop.
helpers index medium express second article
const factories = require('../factories')
const db = require('../../src/models')
before(async function () {
try {
for (let index = 0; index < 4; index++) {
const post = await factories.create('Post')
}
} catch (error) {
console.error(error)
}
})
after(async function () {
await db.sequelize.sync({ force: true })
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment