diff --git a/packages/oid4vci-holder/__tests__/localAgent.test.ts b/packages/oid4vci-holder/__tests__/localAgent.test.ts index 74ce488e0..9790fed5e 100644 --- a/packages/oid4vci-holder/__tests__/localAgent.test.ts +++ b/packages/oid4vci-holder/__tests__/localAgent.test.ts @@ -1,24 +1,19 @@ -import { DataSource } from 'typeorm' import { createObjects, getConfig } from '../../agent-config/dist' +import eventLoggerAgentLogic from './shared/oid4vciHolderLogicAgentLogic' jest.setTimeout(60000) -import eventLoggerAgentLogic from './shared/oid4vciHolderLogicAgentLogic' - -let dbConnection: Promise let agent: any const setup = async (): Promise => { const config = await getConfig('packages/oid4vci-holder/agent.yml') - const { localAgent, db } = await createObjects(config, { localAgent: '/agent' }) + const { localAgent } = await createObjects(config, { localAgent: '/agent' }) agent = localAgent - dbConnection = db return true } const tearDown = async (): Promise => { - await (await dbConnection).close() return true } diff --git a/packages/oid4vci-holder/__tests__/restAgent.test.ts b/packages/oid4vci-holder/__tests__/restAgent.test.ts index e199d5419..cd2811840 100644 --- a/packages/oid4vci-holder/__tests__/restAgent.test.ts +++ b/packages/oid4vci-holder/__tests__/restAgent.test.ts @@ -2,8 +2,7 @@ import 'cross-fetch/polyfill' // @ts-ignore import express, { Router } from 'express' import { Server } from 'http' -import { DataSource } from 'typeorm' -import { IAgent, createAgent, IAgentOptions } from '@veramo/core' +import { createAgent, IAgent, IAgentOptions } from '@veramo/core' import { AgentRestClient } from '@veramo/remote-client' import { AgentRouter, RequestWithAgentRouter } from '@veramo/remote-server' import { createObjects, getConfig } from '../../agent-config/dist' @@ -17,7 +16,6 @@ const basePath = '/agent' let serverAgent: IAgent let restServer: Server -let dbConnection: Promise const getAgent = (options?: IAgentOptions) => createAgent({ @@ -33,9 +31,8 @@ const getAgent = (options?: IAgentOptions) => const setup = async (): Promise => { const config = await getConfig('packages/oid4vci-holder/agent.yml') - const { agent, db } = await createObjects(config, { agent: '/agent', db: '/dbConnection' }) + const { agent } = await createObjects(config, { agent: '/agent' }) serverAgent = agent - dbConnection = db const agentRouter: Router = AgentRouter({ exposedMethods: serverAgent.availableMethods(), @@ -56,7 +53,6 @@ const setup = async (): Promise => { const tearDown = async (): Promise => { restServer.close() - await (await dbConnection).close() return true }