Skip to content
代码片段 群组 项目
未验证 提交 a25e4c41 编辑于 作者: Lorenz van Herwaarden's avatar Lorenz van Herwaarden 提交者: GitLab
浏览文件

Fix vue 3 jest spec failure for section_identifiers.vue

上级 379d3cbb
No related branches found
No related tags found
无相关合并请求
...@@ -56,20 +56,20 @@ describe('New vulnerability - Section Identifiers', () => { ...@@ -56,20 +56,20 @@ describe('New vulnerability - Section Identifiers', () => {
expect(findFormGroup(1).text()).toContain(ERROR_IDENTIFIER_URL); expect(findFormGroup(1).text()).toContain(ERROR_IDENTIFIER_URL);
}); });
it('emits change event when input changes', () => { it('emits change event when input changes', async () => {
const codeInput = findIdentifierCodeInput(); const codeInput = findIdentifierCodeInput();
const urlInput = findIdentifierUrlInput(); const urlInput = findIdentifierUrlInput();
codeInput.setValue('cve-23'); codeInput.setValue('cve-23');
urlInput.setValue('https://gitlab.com'); urlInput.setValue('https://gitlab.com');
expect(wrapper.emitted('change')[0][0]).toEqual({ await nextTick();
identifiers: [{ name: 'cve-23', url: '' }],
});
expect(wrapper.emitted('change')[1][0]).toEqual({ expect(wrapper.emitted('change').at(-1)).toEqual([
identifiers: [{ name: 'cve-23', url: 'https://gitlab.com' }], {
}); identifiers: [{ name: 'cve-23', url: 'https://gitlab.com' }],
},
]);
}); });
it('adds and removes identifier rows', async () => { it('adds and removes identifier rows', async () => {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册