Skip to content

Commit e8ad4af

Browse files
committed
add instructions for how to run the test suite. These instructions are incomplete but a useful starting point
1 parent 621fc0d commit e8ad4af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Readme.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,15 @@ will have:
858858
* As much debugging output and information about your environment (mysql
859859
version, node version, os, etc.) as you can gather.
860860

861+
## Running unit tests
862+
863+
Set the environment variables `MYSQL_DATABASE`, `MYSQL_HOST`, `MYSQL_PORT`, `MYSQL_USER` and `MYSQL_PASSWORD`. Then run `make test`. E.g.
864+
865+
mysql -u root -e "CREATE DATABASE IF NOT EXISTS node_mysql_test_db"
866+
mysql -u root -e "CREATE USER 'node_mysql_test'@'localhost' IDENTIFIED BY ''"
867+
mysql -u root -e "GRANT ALL ON node_mysql_test_db.* TO 'node_mysql_test'@'%'"
868+
export MYSQL_DATABASE=node_mysql_test_db && export MYSQL_USER=node_mysql_test && make test
869+
861870
## Todo
862871

863872
* Prepared statements

0 commit comments

Comments
 (0)