Files
mobilizon-frontend/tests/unit/specs/components/stories/EventCardStory.spec.ts
Massedil 7ceb631518 fix: significantly reduce unnecessary GraphQL HTTP calls for config information
Also stops calling the heavy ABOUT GraphQL query on HomeView, which does not require the longDescription field.

Fixes #1598
2025-06-20 23:58:41 +02:00

26 lines
680 B
TypeScript

import { beforeEach, describe, expect, it } from "vitest";
import { mount, VueWrapper } from "@vue/test-utils";
import EventCardStory from "@/components/Event/EventCard.story.vue";
import {
createMockIntersectionObserver,
getMockClient,
} from "../../mocks/client";
import { CONFIG } from "@/graphql/config"; //
describe("Event Card Story", () => {
let wrapper: VueWrapper;
const generateWrapper = () => {
wrapper = mount(EventCardStory, {
global: getMockClient([CONFIG]),
});
};
beforeEach(() => {
createMockIntersectionObserver();
});
it("Default", async () => {
generateWrapper();
expect(wrapper.html()).toMatchSnapshot();
});
});