feat: #7065 created unit tests for UserPanel #1260
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix-front#1260
Loading…
Reference in New Issue
No description provided.
Delete Branch "7065-testUserPanel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +14,4 @@
let axiosPostMock;
beforeAll(() => {
axiosPatchMock = vi.spyOn(axios, 'patch').mockResolvedValue({});
Porque en WagonCreate no creas variable?
Dentro del expect usas axios.patch
@ -0,0 +15,4 @@
beforeAll(() => {
axiosPatchMock = vi.spyOn(axios, 'patch').mockResolvedValue({});
axiosPostMock = vi.spyOn(axios, 'post').mockResolvedValue({});
estas haciendo mock o spy? Quizas el nombre de la variable no es la mejor
@ -0,0 +52,4 @@
expect(vm.darkMode).toBe(true);
});
it('should change user language and update preferences', async () => {
revisa a ver si puedes repetir menos veces 'es'
@ -0,0 +60,4 @@
expect(vm.locale).toBe('es');
});
it('should update user data', async () => {
podemos hacer que name y boss no se repitan tanto?
Los tests no pasan, revisalo y me vuelves a pedir
@ -0,0 +4,4 @@
import axios from 'axios';
import { useState } from 'src/composables/useState';
vi.mock('axios');
Tengo dudas de esta linea