0
0
Fork 0

feat: mock validations

This commit is contained in:
Jorge Penadés 2024-12-03 14:37:45 +01:00
parent 4b1a4adfe3
commit 94c0177f1b
1 changed files with 12 additions and 1 deletions

View File

@ -44,7 +44,18 @@ vi.mock('vue-router', () => ({
vi.mock('axios');
vi.spyOn(useValidator, 'useValidator').mockImplementation(() => {
return { validate: vi.fn() };
return {
validate: vi.fn(),
validations: () => ({
format: vi.fn(),
presence: vi.fn(),
required: vi.fn(),
length: vi.fn(),
numericality: vi.fn(),
min: vi.fn(),
custom: vi.fn(),
}),
};
});
class FormDataMock {