style(lint): lint front end test files

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-05-26 17:35:52 +02:00
parent 759b26e203
commit 98e8546c9a
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
7 changed files with 21 additions and 21 deletions

View file

@ -102,7 +102,7 @@ import RouteName from "@/router/name";
import EmptyContent from "@/components/Utils/EmptyContent.vue";
import { useQuery } from "@vue/apollo-composable";
import { useI18n } from "vue-i18n";
import { computed, ref } from "vue";
import { computed } from "vue";
import { useHead } from "@vueuse/head";
import {
useRouteQuery,

View file

@ -4,7 +4,7 @@ import { createRouter, createWebHistory, Router } from "vue-router";
import { routes } from "@/router";
import { CommentModeration, EventJoinOptions } from "@/types/enums";
import { InMemoryCache } from "@apollo/client/cache";
import { beforeEach, describe, expect, vi, it } from "vitest";
import { beforeEach, describe, expect, it } from "vitest";
import Oruga from "@oruga-ui/oruga-next";
import FloatingVue from "floating-vue";
@ -34,12 +34,7 @@ const eventData = {
describe("ParticipationSection", () => {
let wrapper: VueWrapper;
const generateWrapper = (
customProps: Record<string, unknown> = {},
baseData: Record<string, unknown> = {}
) => {
const cache = new InMemoryCache({ addTypename: false });
const generateWrapper = (customProps: Record<string, unknown> = {}) => {
wrapper = mount(ParticipationSection, {
stubs: {
ParticipationButton: true,

View file

@ -1,6 +1,6 @@
import { config, mount } from "@vue/test-utils";
import { mount } from "@vue/test-utils";
import PostListItem from "@/components/Post/PostListItem.vue";
import { vi, beforeEach, describe, it, expect } from "vitest";
import { beforeEach, describe, it, expect } from "vitest";
import { enUS } from "date-fns/locale";
import { routes } from "@/router";
import { createRouter, createWebHistory, Router } from "vue-router";

View file

@ -1,9 +1,7 @@
import { config, mount } from "@vue/test-utils";
import { mount } from "@vue/test-utils";
import ReportCard from "@/components/Report/ReportCard.vue";
import { ActorType } from "@/types/enums";
import { describe, expect, it } from "vitest";
import { createI18n } from "vue-i18n";
import en from "@/i18n/en_US.json";
const reportData = {
id: "1",

View file

@ -1,5 +1,7 @@
const useRouterMock = vi.fn(() => ({
push: () => {},
push: function () {
// do nothing
},
}));
import { config, mount } from "@vue/test-utils";

View file

@ -1,8 +1,14 @@
const useRouterMock = vi.fn(() => ({
push: () => {},
replace: () => {},
push: function () {
// do nothing
},
replace: function () {
// do nothing
},
}));
const useRouteMock = vi.fn(() => {});
const useRouteMock = vi.fn(function () {
// do nothing
});
import { config, mount, VueWrapper } from "@vue/test-utils";
import Login from "@/views/User/LoginView.vue";

View file

@ -1,5 +1,7 @@
const useRouterMock = vi.fn(() => ({
push: () => {},
push: function () {
// do nothing
},
}));
import { shallowMount, VueWrapper } from "@vue/test-utils";
@ -21,7 +23,6 @@ vi.mock("vue-router/dist/vue-router.mjs", () => ({
describe("App component", () => {
let wrapper: VueWrapper;
let mockClient: MockApolloClient | null;
let requestHandlers: Record<string, RequestHandler>;
const createComponent = (handlers = {}) => {
const cache = new InMemoryCache({ addTypename: false });
@ -31,8 +32,6 @@ describe("App component", () => {
resolvers: buildCurrentUserResolver(cache),
});
requestHandlers = { ...handlers };
wrapper = shallowMount(NavBar, {
// stubs: ["router-link", "router-view", "o-dropdown", "o-dropdown-item"],
global: {