How to use the @node-ts/bus-workflow.WorkflowStatus.Running 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
describe('when saving new workflow data', () => {
    const workflowData = new TestWorkflowData()
    workflowData.$workflowId = uuid.v4()
    workflowData.$status = WorkflowStatus.Running
    workflowData.$version = 0
    workflowData.eventValue = 'abc'
    workflowData.property1 = 'something'

    beforeAll(async () => {
      await sut.saveWorkflowData(workflowData)
    })

    it('should add the row into the table', async () => {
      const result = await postgres.query('select count(*) from "workflows"."testworkflowdata"')
      const { count } = result.rows[0] as { count: string }
      expect(count).toEqual('1')
    })

    describe('when getting the workflow data by property', () => {
      const testCommand = new TestCommand(workflowData.property1)