import { Test, TestingModule } from '@nestjs/testing';
import { VersusService } from './versus.service';
import {GuestsService} from "../../guests/guests.service";
import {GuestsServiceMock} from "../../mocks/guests-service.mock";
import {SharedService} from "../../shared/shared.service";
import {getModelToken} from "@nestjs/mongoose";
import {Versus} from "../../schemas/versus.schema";
import {Model} from "mongoose";
import {CommandBus} from "@nestjs/cqrs";

describe('VersusService', () => {
  let service: VersusService;

  beforeEach(async () => {
    const module: TestingModule = await Test.createTestingModule({
      providers: [
        VersusService,
        { provide: GuestsService, useValue: GuestsServiceMock },
        { provide: SharedService, useValue: SharedService },
        { provide: getModelToken(Versus.name), useValue: Model },
        { provide: CommandBus, useValue: CommandBus },
      ],
    }).compile();

    service = module.get<VersusService>(VersusService);
  });

  it('should be defined', () => {
    expect(service).toBeDefined();
  });
});
