bpmn-io / bpmnlint

Validate BPMN diagrams based on configurable lint rules.
MIT License
121 stars 36 forks source link

feat(rule-tester): fuzzy test for equality of moddle elements #79

Closed philippfromme closed 2 years ago

philippfromme commented 2 years ago

Takes into account that reports might include instances of Base. Instances are replaced by ID or type allowing for tests like the following:

RuleTester.verify('foo', rule, {
  [],
  [
    {
      moddleElement: ...,
      report: {
        id: 'Task_1'
        message: 'Foo',
        node: 'Task_1' // instance replaced by ID
      }
    }
  ]
});