2021年4月5日星期一

Error while running integration test with Prisma Migrate

For migration management, I've decided to use Prisma Migrate instead of node-pg-migrate (PostgreSQL). I followed the instructions in this link and everything works fine. However, the main challenge is that my integration tests fail when trying to run migrations on the test database (not the develop database). How can I override the configurations of my test database?

In node-pg-migrate I could simply provide configurations before running the integration test:

import migrationRunner from 'node-pg-migrate';    // --- Integration test setup:  beforeAll(async () => {    await migrationRunner({      migrationsTable: dbConfig['migrations-table'],      dir: dbConfig['migrations-dir'],      schema: dbConfig.schema,      databaseUrl: databaseURL,      // --- other configs    });  }, config.get('test').timeout);  
https://stackoverflow.com/questions/66949330/error-while-running-integration-test-with-prisma-migrate April 05, 2021 at 02:58PM

没有评论:

发表评论