Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor () {
super()
this.load(
new LoggerModule(),
new WinstonModule(),
new BusModule(),
new BusWorkflowModule(),
new HandlersModule()
)
}
}
beforeAll(async () => {
container = new Container()
container.load(new LoggerModule())
container.load(new BusModule())
container.load(new BusWorkflowModule())
container.rebind(LOGGER_SYMBOLS.Logger).toConstantValue(Mock.ofType().object)
persistence = container.get(BUS_WORKFLOW_SYMBOLS.Persistence)
const workflowRegistry = container.get(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
await workflowRegistry.registerFunctional(assignmentWorkflow)
await workflowRegistry.initializeWorkflows()
bootstrap = container.get(BUS_SYMBOLS.ApplicationBootstrap)
await bootstrap.initialize(container)
bus = container.get(BUS_SYMBOLS.Bus)
await bus.send(event)
await sleep(CONSUME_TIMEOUT)
})
beforeAll(async () => {
container = new Container()
container.load(new LoggerModule())
container.load(new BusModule())
container.load(new BusWorkflowModule())
container.rebind(LOGGER_SYMBOLS.Logger).toConstantValue(Mock.ofType().object)
persistence = container.get(BUS_WORKFLOW_SYMBOLS.Persistence)
const workflowRegistry = container.get(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
workflowRegistry.register(TestWorkflow, TestWorkflowData)
workflowRegistry.register(TestWorkflowStartedByCompletes, TestWorkflowStartedByCompletesData)
workflowRegistry.register(TestWorkflowStartedByDiscard, TestWorkflowStartedByDiscardData)
await workflowRegistry.initializeWorkflows()
bootstrap = container.get(BUS_SYMBOLS.ApplicationBootstrap)
await bootstrap.initialize(container)
bus = container.get(BUS_SYMBOLS.Bus)
await bus.send(command)
beforeAll(async () => {
container = new Container()
container.load(new LoggerModule())
container.load(new BusModule())
container.load(new BusWorkflowModule())
logger = Mock.ofType()
container.rebind(LOGGER_SYMBOLS.Logger).toConstantValue(logger.object)
persistence = container.get(BUS_WORKFLOW_SYMBOLS.Persistence)
const workflowRegistry = container.get(BUS_WORKFLOW_SYMBOLS.WorkflowRegistry)
workflowRegistry.register(TestWorkflowMisconfigured, TestWorkflowMisconfiguredData)
await workflowRegistry.initializeWorkflows()
bootstrap = container.get(BUS_SYMBOLS.ApplicationBootstrap)
await bootstrap.initialize(container)
bus = container.get(BUS_SYMBOLS.Bus)
await bus.send(command)
await sleep(CONSUME_TIMEOUT)