Skip to content

Commit

Permalink
test(timeline): test lineType prop (#2566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepush authored Mar 7, 2022
1 parent 1d7fa1a commit ae2eb13
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/timeline/tests/Timeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ describe('n-timeline-item', () => {
)
})

it('should work with `line-type` prop', () => {
;(['default', 'dashed'] as const).forEach((lineType) => {
const wrapper = mount(NTimeline, {
slots: {
default: () =>
h(NTimelineItem, { title: 'test-title', lineType: lineType })
}
})

expect(wrapper.find('.n-timeline-item').classes()).toContain(
`n-timeline-item--${lineType}-line-type`
)
})
})

it('should work with `default`, `footer`, `header` slots', async () => {
const wrapper = mount(NTimeline, {
slots: {
Expand Down

0 comments on commit ae2eb13

Please sign in to comment.