forked from verdnatura/salix-front
feat: mock validations
This commit is contained in:
parent
4b1a4adfe3
commit
94c0177f1b
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue