Fixed #3802 - Improve folder structure for nuxt configurations

This commit is contained in:
mertsincan 2023-03-26 06:22:57 +01:00
parent 851950270b
commit f5fe822afb
563 changed files with 1703 additions and 1095 deletions

View file

@ -0,0 +1,35 @@
import { mount } from '@vue/test-utils';
import InputText from './InputText.vue';
describe('InputText.vue', () => {
it('is InputText component exists', async () => {
const wrapper = mount(InputText);
expect(wrapper.find('.p-inputtext.p-component').exists()).toBe(true);
await wrapper.setProps({ modelValue: 'PrimeVue' });
expect(wrapper.find('.p-filled').exists()).toBe(true);
const input = wrapper.find('input');
expect(input.element.value).toEqual('PrimeVue');
});
it('input event', async () => {
const wrapper = mount(InputText);
const event = { target: { value: 'a' } };
await wrapper.vm.onInput(event);
expect(wrapper.emitted()['update:modelValue'][0]).toEqual(['a']);
});
it('should filled work', async () => {
const wrapper = mount(InputText);
await wrapper.setProps({ modelValue: 'a' });
expect(wrapper.vm.filled).toBe(true);
});
});