const { expect } = require('chai');
const { createModdle } = require('bpmnlint/lib/testers/helper');
const RuleTester = require('bpmnlint/lib/testers/rule-tester');
const manualTaskRule = require('./rules/no-manual-task');
const targetNamespaceRule = require('./rules/target-namespace');
RuleTester.verify('no-manual-task', manualTaskRule, {
valid: [
{
moddleElement: createModdle(
'',
'bpmn:StartEvent'
)
}
],
invalid: [
{
moddleElement: createModdle(
'',
'bpmn:ManualTask'
),
report: {
id: 'manualTask',
message: 'Element has disallowed type bpmn:ManualTask'
}
}
]
});
RuleTester.verify('target-namespace', targetNamespaceRule, {
valid: [
{
moddleElement: createModdle(
'',
)
}
],
invalid: [
{
moddleElement: createModdle(
'',
),
report: {
id: 'definitions',
message: 'Element is missing targetNamespace'
}
}
]
});