Skip to content

Commit

Permalink
test(card): fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Oct 1, 2024
1 parent 4918b58 commit c5afb72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/varlet-ui/src/card/__tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,34 +96,34 @@ describe('test card component props', () => {
wrapper.unmount()
})

test('test card outline', async () => {
test('test card outlined variant', async () => {
const wrapper = mount(VarCard, {
props: {
outline: true,
variant: 'outlined',
},
})

expect(wrapper.find('.var-card--outline').exists()).toBe(true)

await wrapper.setProps({
outline: false,
variant: 'standard',
})
expect(wrapper.find('.var-card--outline').exists()).toBe(false)

wrapper.unmount()
})

test('test card filled', async () => {
test('test card filled variant', async () => {
const wrapper = mount(VarCard, {
props: {
filled: true,
variant: 'filled',
},
})

expect(wrapper.find('.var-card--filled').exists()).toBe(true)

await wrapper.setProps({
filled: false,
variant: 'standard',
})
expect(wrapper.find('.var-card--filled').exists()).toBe(false)

Expand Down

0 comments on commit c5afb72

Please sign in to comment.