-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathsuperfluous-label.mjs
56 lines (48 loc) · 1.03 KB
/
superfluous-label.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import RuleTester from '../../lib/testers/rule-tester.js';
import rule from '../../rules/superfluous-label.js';
import {
readModdle
} from '../../lib/testers/helper.js';
import { stubCJS } from '../helper.mjs';
const {
__dirname
} = stubCJS(import.meta.url);
const message = 'Element has superfluous label/name';
RuleTester.verify('superfluous-label', rule, {
valid: [
{
moddleElement: readModdle(__dirname + '/superfluous-label/valid.bpmn')
}
],
invalid: [
{
moddleElement: readModdle(__dirname + '/no-gateway-join-fork/invalid.bpmn'),
report: [
{
id: 'GATEWAY',
message,
path: [
'name'
],
category: 'error'
},
{
id: 'DEFAULT_FLOW',
message,
path: [
'name'
],
category: 'error'
},
{
id: 'SIMPLE_FLOW',
message,
path: [
'name'
],
category: 'error'
}
]
}
]
});