bpmn-io / bpmnlint

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

feat: rule tester accepts local config #83

Closed philippfromme closed 2 years ago

philippfromme commented 2 years ago

Allows configurable rules to be tested.

Example

RuleTester.verify('my-rule', myRule, {
  valid: [],
  invalid: [
    {
      name: 'with config',
      config: {
        elements: [ 'bpmn:Task' ]
      },
      moddleElement: createModdle('<bpmn:Task id="Task_1" />', 'bpmn:Task'),
      report: {
        id: 'Task_1',
        message: 'Element of type <bpmn:Task> detected'
      }
    }
  ]
});