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 (#1767)
Signed-off-by: Wolfgang Walther <walther@technowledgy.de> Signed-off-by: Wolfgang Walther <walther@technowledgy.de>
- Loading branch information
1 parent
b79fc1f
commit 288d3a5
Showing
3 changed files
with
23 additions
and
11 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