-
-
Notifications
You must be signed in to change notification settings - Fork 269
/
base.tsx
31 lines (29 loc) · 925 Bytes
/
base.tsx
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
import { Box, Text } from 'ink'
import React, { FC } from 'react'
import { Reporter } from './index.js'
import { Log } from './log.js'
import { ResultDetailList } from './result-detail-list.js'
import { Runs } from './runs.js'
import { SuiteSummary } from './suite-summary.js'
const bannerWords = ' 🌈 TEST COMPLETE 🌈 '
const Banner: FC<{}> = () => (
<Box flexDirection="column" marginTop={1}>
<Text backgroundColor="#fff">
{' '.repeat(bannerWords.length)}
</Text>
<Text bold color="black" backgroundColor="#fff">
{bannerWords}
</Text>
<Text backgroundColor="#fff">
{' '.repeat(bannerWords.length)}
</Text>
</Box>
)
export const Base: Reporter = ({ test, config }) => (
<Box flexDirection="column">
<Log test={test} config={config} includeTests />
<Runs test={test} />
<ResultDetailList {...{ test, Banner }} />
<SuiteSummary test={test} />
</Box>
)