Fixed #5095 - Unit tests in the master branch are failing

This commit is contained in:
tugcekucukoglu 2024-01-18 11:14:47 +03:00
parent a40796714c
commit 48aa388953
7 changed files with 22 additions and 68 deletions

View file

@ -25,13 +25,13 @@ describe('ToggleButton', () => {
expect(wrapper.find('span.pi-check').exists()).toBe(true);
});
it('should click works', async () => {
await wrapper.vm.onClick({});
it('should change works', async () => {
await wrapper.vm.onChange({});
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([true]);
await wrapper.setProps({ modelValue: true });
await wrapper.vm.onClick({});
await wrapper.vm.onChange({});
expect(wrapper.emitted()['update:modelValue'][1]).toEqual([false]);
});