index.spec.ts
1.1 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
import graphToLogStruct from '../graph-to-log-struct'
describe('parallel', () => {
const list = graphToLogStruct('(parallel, parallelNode, nodeA, nodeB -> nodeC)')
const [parallelNode, ...parallelDetail] = list
const parallelI18n = 'PARALLEL'
// format will change the list...
// const result = format(cloneDeep(list) as any, () => parallelI18n)
test('parallel should put nodes in details', () => {
// expect(result as any).toEqual([
// {
// ...parallelNode,
// parallelDetail: {
// isParallelStartNode: true,
// parallelTitle: `${parallelI18n}-1`,
// children: [
// parallelNode,
// {
// ...parallelDetail[0],
// parallelDetail: {
// branchTitle: `${parallelI18n}-1-A`,
// },
// },
// {
// ...parallelDetail[1],
// parallelDetail: {
// branchTitle: `${parallelI18n}-1-B`,
// },
// },
// parallelDetail[2],
// ],
// },
// },
// ])
})
})