Last active
July 1, 2020 11:21
-
-
Save kianaditya/e033694bd8b422666d6189bb7f892dbb to your computer and use it in GitHub Desktop.
helpers index medium express second article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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