We have generated the first test to identify an occurrence of RelOver anti-pattern (variation 1, from DKE2015, where the targets of mediation relations are overlapping, i.e., share a common parent class).
With the current setting the result of the test is as follows:
Test Suites: 1 failed, 1 passed, 2 total
Tests: 2 failed, 1 passed, 3 total
With the following output:
RelOver Test › should find the RelOver occurrence
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 0
Received array: []
28 |
29 | it('should find the RelOver occurrence', () => {
> 30 | expect(output.result).toHaveLength(1);
| ^
31 | });
32 |
33 | it('should set «relator» Supervision in the RelOver occurrence', () => {
at Object.<anonymous> (__tests__/libs/antipattern/general.test.ts:30:27)
RelOver Test › should set «relator» Supervision in the RelOver occurrence:
TypeError: Cannot read property 'relator' of undefined
33 | it('should set «relator» Supervision in the RelOver occurrence', () => {
34 | const relover: RelOverOccurrence = output.result[0]; //this means that the output is an array
> 35 | expect(relover.relator).toEqual(supervision);
| ^
36 | });
37 | });
38 |
I would need help to precisely understand the error (actually, thanks to @claudenirmf we discovered what causes the issue and I commented on the related code lines, see test file). However, I am still trying to precisely figure out the issue, thus being able to address it.
We have generated the first test to identify an occurrence of RelOver anti-pattern (variation 1, from DKE2015, where the targets of mediation relations are overlapping, i.e., share a common parent class).
With the current setting the result of the test is as follows:
With the following output:
I would need help to precisely understand the error (actually, thanks to @claudenirmf we discovered what causes the issue and I commented on the related code lines, see test file). However, I am still trying to precisely figure out the issue, thus being able to address it.
Thanks in advance for your help :)