Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function initialize (): Promise {
const workflowRegistry = container.get(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
workflowRegistry.register(SirenTestWorkflow, SirenTestWorkflowData)
await workflowRegistry.initializeWorkflows()
const bootstrap = container.get(BUS_SYMBOLS.ApplicationBootstrap)
bootstrap.registerHandler(StartSirenTestHandler)
bootstrap.registerHandler(EmailMaintenanceTeamHandler)
await bootstrap.initialize(container)
}
beforeAll(async () => {
container = new TestContainer()
container.bind(BUS_POSTGRES_SYMBOLS.PostgresConfiguration).toConstantValue(configuration)
bus = container.get(BUS_SYMBOLS.Bus)
sut = container.get(BUS_WORKFLOW_SYMBOLS.Persistence)
postgres = container.get(BUS_POSTGRES_INTERNAL_SYMBOLS.PostgresPool)
workflows = container.get(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
workflows.register(TestWorkflow, TestWorkflowData)
await workflows.initializeWorkflows()
bootstrap = container.get(BUS_SYMBOLS.ApplicationBootstrap)
await bootstrap.initialize(container)
})