-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathVerticalLayout.js
45 lines (39 loc) · 1.01 KB
/
VerticalLayout.js
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
import test from 'ava';
import Tester from './helpers/Tester';
import { ChartTracer, LogTracer, VerticalLayout } from '..';
test('VerticalLayout', new Tester(execute => {
let chartTracer;
let logTracer;
let layout;
let key;
execute([
chartTracer = new ChartTracer(),
logTracer = new LogTracer(),
layout = new VerticalLayout([chartTracer, logTracer]),
key = layout.key,
],
{ key: chartTracer.key, method: 'ChartTracer', args: [] },
{ key: logTracer.key, method: 'LogTracer', args: [] },
{ key, method: 'VerticalLayout', args: [[chartTracer.key, logTracer.key]] },
);
execute([
layout.add(chartTracer),
],
{ key, method: 'add', args: [chartTracer.key] },
);
execute([
layout.destroy(),
],
{ key, method: 'destroy', args: [] },
);
execute([
layout.remove(logTracer),
],
{ key, method: 'remove', args: [logTracer.key] },
);
execute([
layout.removeAll(),
],
{ key, method: 'removeAll', args: [] },
);
}).test);