style(lint): lint front end test files
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
759b26e203
commit
98e8546c9a
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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";
|
||||
|
@ -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",
|
||||
|
@ -1,5 +1,7 @@
|
||||
const useRouterMock = vi.fn(() => ({
|
||||
push: () => {},
|
||||
push: function () {
|
||||
// do nothing
|
||||
},
|
||||
}));
|
||||
|
||||
import { config, mount } from "@vue/test-utils";
|
||||
|
@ -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";
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user