-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add props to stubs for built-in components
Signed-off-by: Wolfgang Walther <[email protected]>
- Loading branch information
1 parent
41f77b3
commit 0de4bb4
Showing
3 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import { expect, test } from 'vitest' | ||
import { describe, expect, test } from 'vitest' | ||
import { WithTransition } from '../components/WithTransition' | ||
import { mount } from '../../src' | ||
|
||
test('works with transitions', async () => { | ||
const wrapper = mount(WithTransition) | ||
expect(wrapper.find('#message').exists()).toBe(false) | ||
describe('transitions', () => { | ||
test('work', async () => { | ||
const wrapper = mount(WithTransition) | ||
expect(wrapper.find('#message').exists()).toBe(false) | ||
|
||
await wrapper.find('button').trigger('click') | ||
expect(wrapper.find('#message').exists()).toBe(true) | ||
await wrapper.find('button').trigger('click') | ||
expect(wrapper.find('#message').exists()).toBe(true) | ||
}) | ||
|
||
test('have props', () => { | ||
const wrapper = mount(WithTransition) | ||
expect(wrapper.getComponent({ name: 'transition' }).props('name')).toBe( | ||
'fade' | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters