chore: rework timeline tests

zio/stable
patak 2023-01-04 14:14:33 +01:00
parent 9890656477
commit 6a7633b758
1 changed files with 10 additions and 20 deletions

View File

@ -32,34 +32,24 @@ const r_b2 = reblog('r_b2', p_b2)
describe('timeline reordering', () => {
it('reorder basic', () => {
expect(reorderedTimeline([p_a1, p_a2, p_a3]))
.toMatchInlineSnapshot([p_a1, p_a2, p_a3])
expect(reorderedTimeline([r_a2, r_a1])).toEqual([r_a1, r_a2])
expect(reorderedTimeline([p_a3, p_a2, p_a1]))
.toMatchInlineSnapshot([p_a1, p_a2, p_a3])
expect(reorderedTimeline([r_a2, p_a1])).toEqual([p_a1, r_a2])
expect(reorderedTimeline([p_a2, p_a3, p_a1]))
.toMatchInlineSnapshot([p_a1, p_a2, p_a3])
expect(reorderedTimeline([p_a1, p_a2, p_a3])).toEqual([p_a1, p_a2, p_a3])
expect(reorderedTimeline([p_a2, p_b3, p_a3, p_b1, p_a1, p_b2]))
.toMatchInlineSnapshot([p_a1, p_a2, p_a3, p_b1, p_b2, p_b3])
expect(reorderedTimeline([p_a3, p_a2, p_a1])).toEqual([p_a1, p_a2, p_a3])
expect(reorderedTimeline([r_a2, p_a1]))
.toMatchInlineSnapshot([p_a1, r_a2])
expect(reorderedTimeline([p_a2, p_a3, p_a1])).toEqual([p_a1, p_a2, p_a3])
expect(reorderedTimeline([r_a2, p_b3, p_a3, p_b1, p_a1, r_b2]))
.toMatchInlineSnapshot([p_a1, r_a2, p_a3, p_b1, r_b2, p_b3])
expect(reorderedTimeline([p_a2, p_b3, p_a3, p_b1, p_a1, p_b2])).toEqual([p_a1, p_a2, p_a3, p_b1, p_b2, p_b3])
expect(reorderedTimeline([r_a2, p_b3, p_a3, p_b1, p_a1, r_b2]))
.toMatchInlineSnapshot([p_a1, r_a2, p_a3, p_b1, r_b2, p_b3])
expect(reorderedTimeline([r_a2, p_b3, p_a3, p_b1, p_a1, r_b2])).toEqual([p_a1, r_a2, p_a3, p_b1, r_b2, p_b3])
expect(reorderedTimeline([p_a1, p_b1, p_a2, p_b2, p_a3, p_b3]))
.toMatchInlineSnapshot([p_a1, p_a2, p_a3, p_b1, p_b2, p_b3])
expect(reorderedTimeline([r_a2, p_b3, p_a3, p_b1, p_a1, r_b2])).toEqual([p_a1, r_a2, p_a3, p_b1, r_b2, p_b3])
expect(reorderedTimeline([r_a2, r_a1]))
.toMatchInlineSnapshot([r_a1, r_a2])
expect(reorderedTimeline([p_a1, p_b1, p_a2, p_b2, p_a3, p_b3])).toEqual([p_a1, p_a2, p_a3, p_b1, p_b2, p_b3])
expect(reorderedTimeline([p_a3, r_a1, r_a2, r_b2, p_b3, r_b1]))
.toMatchInlineSnapshot([r_a1, r_a2, p_a3, r_b1, r_b2, p_b3])
expect(reorderedTimeline([p_a3, r_a1, r_a2, r_b2, p_b3, r_b1])).toEqual([r_a1, r_a2, p_a3, r_b1, r_b2, p_b3])
})
})