0

I am using the node module db-migrate for database migration.

I am looking for a way to seed my test-database with some data, an ADMIN-user in my case, so that my tests can retrieve this entry.

I know how to add an initial entry to my database via one of the migration sql-files. I don't think this is a good practice though.

Can someone show me a good way to seed a database and ideally do so only when executing tests?

Luk
  • 1,009
  • 2
  • 15
  • 33

0 Answers0