style: refs #7356 eslint format
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Javier Segarra 2025-03-03 10:22:07 +01:00
parent 967848c790
commit a7af697947
1 changed files with 35 additions and 29 deletions

View File

@ -168,16 +168,18 @@ describe('CrudModel', () => {
result = vm.isEmpty(dummyArray);
expect(result).toBe(false);
})
});
});
describe('resetData()', () => {
it('should add $index to elements in data[] and sets originalData and formData with data', async () => {
data = [{
data = [
{
name: 'Tony',
lastName: 'Stark',
age: 42,
}];
},
];
vm.resetData(data);
@ -210,11 +212,13 @@ describe('CrudModel', () => {
});
describe('saveChanges()', () => {
data = [{
data = [
{
name: 'Tony',
lastName: 'Stark',
age: 42,
}];
},
];
it('should call saveFn if exists', async () => {
await wrapper.setProps({ saveFn: vi.fn() });
@ -231,11 +235,13 @@ describe('CrudModel', () => {
it("should use default url if there's not saveFn", async () => {
const postMock = vi.spyOn(axios, 'post');
vm.formData = [{
vm.formData = [
{
name: 'Bruce',
lastName: 'Wayne',
age: 45,
}]
},
];
await vm.saveChanges(data);