Fix tests on main (#479)
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
import { Navigate, Route, Routes } from 'react-router-dom';
|
import { Navigate, Route, Routes } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { useTrackPageView } from '@/analytics/hooks/useTrackPageView';
|
||||||
import { RequireAuth } from '@/auth/components/RequireAuth';
|
import { RequireAuth } from '@/auth/components/RequireAuth';
|
||||||
import { RequireNotAuth } from '@/auth/components/RequireNotAuth';
|
import { RequireNotAuth } from '@/auth/components/RequireNotAuth';
|
||||||
import { useTrackPageView } from '@/analytics/hooks/useTrackPageView';
|
|
||||||
import { useGoToHotkeys } from '@/hotkeys/hooks/useGoToHotkeys';
|
import { useGoToHotkeys } from '@/hotkeys/hooks/useGoToHotkeys';
|
||||||
import { DefaultLayout } from '@/ui/layout/DefaultLayout';
|
import { DefaultLayout } from '@/ui/layout/DefaultLayout';
|
||||||
import { Index } from '~/pages/auth/Index';
|
import { Index } from '~/pages/auth/Index';
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { getOperationName } from '@apollo/client/utilities';
|
import { getOperationName } from '@apollo/client/utilities';
|
||||||
import { graphql } from 'msw';
|
import { graphql } from 'msw';
|
||||||
|
|
||||||
import { GET_COMPANIES } from '@/companies/services';
|
|
||||||
import { CREATE_EVENT } from '@/analytics/services';
|
import { CREATE_EVENT } from '@/analytics/services';
|
||||||
|
import { GET_COMPANIES } from '@/companies/services';
|
||||||
import { GET_PEOPLE, UPDATE_PERSON } from '@/people/services';
|
import { GET_PEOPLE, UPDATE_PERSON } from '@/people/services';
|
||||||
import {
|
import {
|
||||||
SEARCH_COMPANY_QUERY,
|
SEARCH_COMPANY_QUERY,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { ObjectType, Field, Int } from '@nestjs/graphql';
|
import { ObjectType, Field } from '@nestjs/graphql';
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class Event {
|
export class Event {
|
||||||
|
|||||||
@ -1,12 +1,14 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { EventResolver } from './event.resolver';
|
import { EventResolver } from './event.resolver';
|
||||||
import { EventService } from './event.service';
|
import { EventService } from './event.service';
|
||||||
|
import { HttpModule } from '@nestjs/axios';
|
||||||
|
|
||||||
describe('EventResolver', () => {
|
describe('EventResolver', () => {
|
||||||
let resolver: EventResolver;
|
let resolver: EventResolver;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
|
imports: [HttpModule],
|
||||||
providers: [EventResolver, EventService],
|
providers: [EventResolver, EventService],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Resolver, Mutation, Args, Context } from '@nestjs/graphql';
|
import { Resolver, Mutation, Args } from '@nestjs/graphql';
|
||||||
import { EventService } from './event.service';
|
import { EventService } from './event.service';
|
||||||
import { Event } from './event.entity';
|
import { Event } from './event.entity';
|
||||||
import { CreateEventInput } from './dto/create-event.input';
|
import { CreateEventInput } from './dto/create-event.input';
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { EventService } from './event.service';
|
import { EventService } from './event.service';
|
||||||
|
import { HttpModule } from '@nestjs/axios';
|
||||||
|
|
||||||
describe('EventService', () => {
|
describe('EventService', () => {
|
||||||
let service: EventService;
|
let service: EventService;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const module: TestingModule = await Test.createTestingModule({
|
const module: TestingModule = await Test.createTestingModule({
|
||||||
|
imports: [HttpModule],
|
||||||
providers: [EventService],
|
providers: [EventService],
|
||||||
}).compile();
|
}).compile();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user