- I’ve install codeceptjs-dbhelper with MySQL driver and added property DbHelper to codecept.conf.js:
"DbHelper": { "require": "./node_modules/codeceptjs-dbhelper" }
- Then I’ve added BeforeSuite (with my db params) to my test file
BeforeSuite( async( I ) => {
// The first parameter is the key that will hold a reference to the db
I.connect( “testdb”, “mysql://root:mypassword@localhost:3306/testdb” );
} );
But when I run test, I’ve got error:
“before all” hook: BeforeSuite for “I try to test deck page appearance”:
I.connect is not a function
How can I solve this problem?