Sources for the post on RisingStack engineering of the same title.
Environmental variables can be provided by placing a .env
file in the root or when invoking the scripts.
MYSQL_HOST
defaults tolocalhost
MYSQL_PORT
defaults to3306
,MYSQL_USER
defaults toroot
,MYSQL_PASSWORD
,MYSQL_DB
defaults topartition_test
,
Make sure you have MySQL installed and running
npm run setup
creates a schema defined by MYSQL_DB
, used by the tests later on
npm test
npm run test-unit
Make sure MySQL is installed and running
npm run test-e2e
If you don't agree with anything or you found a mistake that needs to be corrected feel free to open an issue, leave a comment under the post or open a pull request.