Skip to content
代码片段 群组 项目
提交 291ba4e1 编辑于 作者: Peter Hegman's avatar Peter Hegman
浏览文件

Merge branch '413348-fix-toast-mock' into 'master'

Fix toast registration_token_reset_dropdown mock

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123371



Merged-by: default avatarPeter Hegman <phegman@gitlab.com>
Approved-by: default avatarPeter Hegman <phegman@gitlab.com>
Co-authored-by: default avatarMiguel Rincon <mrincon@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -33,6 +33,8 @@ describe('RegistrationTokenResetDropdownItem', () => {
const clickSubmit = () => findModal().vm.$emit('primary', mockEvent);
const createComponent = ({ props, provide = {} } = {}) => {
showToast = jest.fn();
wrapper = shallowMount(RegistrationTokenResetDropdownItem, {
provide,
propsData: {
......@@ -45,9 +47,12 @@ describe('RegistrationTokenResetDropdownItem', () => {
directives: {
GlModal: createMockDirective('gl-modal'),
},
mocks: {
$toast: {
show: showToast,
},
},
});
showToast = wrapper.vm.$toast ? jest.spyOn(wrapper.vm.$toast, 'show') : null;
};
beforeEach(() => {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册