Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 28 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Test, { fixtures } from '../Test'; |
||
2 | import chronicle, { reporters } from '../entry'; |
||
3 | import { compareTexts } from '../utils'; |
||
4 | |||
5 | const Reporter = reporters['api-blueprint']; |
||
6 | |||
7 | const factory = new Test(chronicle); |
||
8 | |||
9 | suite('api-blueprint reporter'); |
||
10 | |||
11 | before(async function () { |
||
12 | await factory.cleanup(); |
||
13 | await factory.setActions(); |
||
14 | await factory.setTmpFolder(); |
||
15 | }); |
||
16 | |||
17 | test('Positive: api-blueprint template with one action', async function () { |
||
18 | const action = factory.actions[0].data; |
||
19 | const groups = { [action.context.group]: { [action.context.title]: [ action.id ] } }; |
||
20 | const reporter = new Reporter(); |
||
21 | const map = new Map([ [ action.id, action ] ]); |
||
22 | |||
23 | await reporter._init(); |
||
24 | compareTexts( |
||
25 | reporter._generate(groups, map), |
||
26 | fixtures.reports.apiBlueprint.createUser |
||
27 | ); |
||
28 | }); |
||
29 |