Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 38 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { assert } from 'chai'; |
||
2 | import Test, { fixtures } from '../Test'; |
||
3 | import chronicle, { reporters } from '../entry'; |
||
4 | |||
5 | const Reporter = reporters.swagger; |
||
6 | const factory = new Test(chronicle); |
||
7 | |||
8 | suite('swagger reporter'); |
||
9 | |||
10 | before(async function () { |
||
11 | await factory.cleanup(); |
||
12 | await factory.setActions(); |
||
13 | await factory.setTmpFolder(); |
||
14 | }); |
||
15 | |||
16 | |||
17 | // test('Positive: swagger reporter grouping', async function () { |
||
18 | // const instance = new Chronicle(); |
||
19 | // const reporter = new Reporter(); |
||
20 | |||
21 | // factory.setRandomActions([ |
||
22 | // [ 'get', '/users?name=A' ], |
||
23 | // [ 'post', '/users' ], |
||
24 | // [ 'post', '/users' ] |
||
25 | // ], instance); |
||
26 | |||
27 | // const { groups } = await reporter._build(instance._actions.map(a => a.data)); |
||
28 | // }); |
||
29 | |||
30 | |||
31 | test('Positive: swagger action template', async function () { |
||
32 | const reporter = new Reporter(); |
||
33 | |||
34 | assert.deepEqual( |
||
35 | reporter._renderAction(factory.actions[0]), |
||
36 | fixtures.reports.swagger.createUserAction |
||
37 | ); |
||
38 | }); |
||
39 |