diff --git a/test/connection.ts b/test/connection.ts index 6959eaa..fc085cd 100644 --- a/test/connection.ts +++ b/test/connection.ts @@ -1,6 +1,6 @@ import { Sequelize } from 'sequelize'; -export default (DB?: 'postgres' | 'mysql') => { +export default (DB?: 'postgres' | 'mysql' | string) => { console.log('DB:', DB); if (DB === 'postgres') { return new Sequelize('sequelize', 'postgres', 'password', { diff --git a/test/hooks.dehydrate.test.ts b/test/hooks.dehydrate.test.ts index 1d80e2e..c7661af 100644 --- a/test/hooks.dehydrate.test.ts +++ b/test/hooks.dehydrate.test.ts @@ -4,7 +4,7 @@ import Sequelize from 'sequelize'; import { dehydrate } from '../src/hooks/dehydrate'; import makeConnection from './connection'; -const sequelize = makeConnection(); +const sequelize = makeConnection(process.env.DB); type MethodName = 'find' | 'get' | 'create' | 'update' | 'patch' | 'remove'; diff --git a/test/hooks.hydrate.test.ts b/test/hooks.hydrate.test.ts index f461876..5667d6b 100644 --- a/test/hooks.hydrate.test.ts +++ b/test/hooks.hydrate.test.ts @@ -4,7 +4,7 @@ import Sequelize from 'sequelize'; import { hydrate } from '../src/hooks/hydrate'; import makeConnection from './connection' -const sequelize = makeConnection(); +const sequelize = makeConnection(process.env.DB); type MethodName = 'find' | 'get' | 'create' | 'update' | 'patch' | 'remove'; diff --git a/test/index.test.ts b/test/index.test.ts index 88a0117..9f24588 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -89,7 +89,7 @@ const testSuite = adaptertests([ // https://github.com/sequelize/sequelize/issues/1774 pg.defaults.parseInt8 = true; -const sequelize = makeConnection(); +const sequelize = makeConnection(process.env.DB); const Model = sequelize.define('people', { name: {