How to use the @node-ts/bus-workflow.MessageWorkflowMapping function in @node-ts/bus-workflow

To help you get started, we’ve selected a few @node-ts/bus-workflow 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-postgres / src / postgres-persistence.integration.ts View on Github external
it('should retrieve the item', async () => {
        mapping = new MessageWorkflowMapping (
          cmd => cmd.property1,
          'property1'
        )
        const results = await sut.getWorkflowData(
          TestWorkflowData,
          mapping,
          testCommand,
          messageOptions
        )
        expect(results).toHaveLength(1)
        dataV1 = results[0]
        expect(dataV1).toMatchObject({ ...workflowData, $version: 1 })
      })