-
-
Notifications
You must be signed in to change notification settings - Fork 866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With sequelize example #899
With sequelize example #899
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is epic! You rock! Some little nits here and there.
@jaredpalmer I have a question. I wonder if I should not perhaps add a test to promote api testing. The only thing is that I found that I know some people like to use some wizardry to create a new database process with various ports to keep the parallel testing in place. I never tried it. |
@mschipperheyn for db setup, I usually put it into the package.json scripts as a setup and just add it as a requirement before running jest: "scripts": {
"unit": "node ./jest-setup/migrate-db.js && node ./jest-setup/seed-db.js && npm run test"
} where const { spawn } = require('child-process-promise')
const run = async () => {
const url = process.env.TEST_DB_URL || 'mysql://root@localhost:3306/database-test'
try {
await spawn('./node_modules/.bin/sequelize', ['db:migrate', `--url=${url}`], { stdio: 'inherit' })
console.log('Migration success')
} catch (e) {
console.error('migration failed')
process.exit(1)
}
process.exit(0)
}
run() If you like, you can modify this PR (I know its quite old now, sorry for the delay) or I can just merge it in as is and you can make another PR when you have time to add this in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like all review change requests has been addressed
@elliottjro hello, why you don't merge this 😎? |
Could you do this against the finch branch? |
Um, finch branch is now canary, can you do this against canary? |
With-sequelize example.
Highlights:
I can move this example to master if you prefer.