mirror of https://github.com/rancher/dashboard.git
Add tests
This commit is contained in:
parent
7d16a8ed1f
commit
6881f21bc1
|
|
@ -0,0 +1,31 @@
|
|||
import { mount, type VueWrapper } from '@vue/test-utils';
|
||||
import MembershipEditor from '@shell/components/form/Members/MembershipEditor.vue';
|
||||
|
||||
describe('component: MembershipEditor', () => {
|
||||
let wrapper: VueWrapper<any, any>;
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(MembershipEditor, {
|
||||
props: {
|
||||
addMemberDialogName: 'addMemberDialogName',
|
||||
parentKey: 'parentKey',
|
||||
mode: 'edit',
|
||||
type: 'no idea',
|
||||
},
|
||||
global: {
|
||||
mocks: {
|
||||
$store: { getters: { 'rancher/schemaFor': () => ({ type: 'object' }) } },
|
||||
$fetchState: { pending: false },
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should render the component', () => {
|
||||
expect(wrapper.exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('should remove the correct member', () => {
|
||||
expect(wrapper.vm.members).toStrictEqual([]);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue