How to use the @node-ts/bus-core.sleep function in @node-ts/bus-core

To help you get started, we’ve selected a few @node-ts/bus-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-ts / bus / packages / bus-sqs / src / sqs-transport.integration.ts View on Github external
it('should receive and dispatch to the handler', async () => {
        await sleep(1000 * 2)
        handleChecker.verify(
          h => h.check(It.isObjectWith(messageOptions)),
          Times.once()
        )
      })
    })
github node-ts / bus / packages / bus-workflow / src / workflow / decorators / started.spec.ts View on Github external
beforeAll(async () => {
          await bus.publish(
            assignmentReassigned,
            { correlationId: startedWorkflowData[0].$workflowId, attributes: {}, stickyAttributes: {} }
          )
          await sleep(CONSUME_TIMEOUT)

          nextWorkflowData = await persistence.getWorkflowData(
            AssignmentWorkflowData,
            propertyMapping,
            assignmentAssigned,
            messageOptions,
            true
          )
        })