This returns data from database and that can be used further for any assertion in database testing automation. This is just a sample database connection and validation. You can change it to suite your requirement.
These code blocks are tested with real database connections so you can copy and reuse them after making some changes at identified places
npm Tedious connection example
more code ?