-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathHorizontalLayout.js
More file actions
45 lines (39 loc) · 1.02 KB
/
HorizontalLayout.js
File metadata and controls
45 lines (39 loc) · 1.02 KB
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, HorizontalLayout, LogTracer } from '..';
test('HorizontalLayout', new Tester(execute => {
let chartTracer;
let logTracer;
let layout;
let key;
execute([
chartTracer = new ChartTracer(),
logTracer = new LogTracer(),
layout = new HorizontalLayout([chartTracer, logTracer]),
key = layout.key,
],
{ key: chartTracer.key, method: 'ChartTracer', args: [] },
{ key: logTracer.key, method: 'LogTracer', args: [] },
{ key, method: 'HorizontalLayout', 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);