Help me with dbhelper

  1. I’ve install codeceptjs-dbhelper with MySQL driver and added property DbHelper to codecept.conf.js:
    "DbHelper": { "require": "./node_modules/codeceptjs-dbhelper" }
  2. 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?

I’ve found error!
I’m using CodeceptJS 3, not 2.
So my BeforeSuite method should be like

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” );
} );