218247e49791ff86866cd0d0c654f088a3eb64ef.svn-base
793 Bytes
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
const React = require('react')
const {Box, Color} = require('ink')
module.exports = ({fail, pass, todo, skip}) => (
<Box>
<Box width={10}>
<Color bold>Asserts:</Color>
</Box>
{ !fail && !pass && !todo && !skip ? '0 ' : '' }
{ fail ? (
<Box>
<Color red>{fail} failed</Color>
<Box>{', '}</Box>
</Box>
) : ''}
{ pass ? (
<Box>
<Color green>{pass} passed</Color>
<Box>{', '}</Box>
</Box>
) : ''}
{ todo ? (
<Box>
<Color magenta>{todo} todo</Color>
<Box>{', '}</Box>
</Box>
) : ''}
{ skip ? (
<Box>
<Color cyan>{skip} skip</Color>
<Box>{', '}</Box>
</Box>
) : ''}
<Box>
of {pass + fail + todo + skip}
</Box>
</Box>
)