Failed tests: 1/14. Failed suites: 4/15.
```
β Test suite failed to run
src/events/events.controller.spec.ts:109:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'.
Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'.
109 .mockResolvedValueOnce(successResponse);
~~~~~~~~~~~~~~~
src/events/events.service.ts:82:9
82 prior_check_in: true,
~~~~~~~~~~~~~~~~~~~~
'prior_check_in' is declared here.
src/events/events.controller.spec.ts:167:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'.
Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'.
167 .mockResolvedValueOnce(successResponse);
~~~~~~~~~~~~~~~
src/events/events.service.ts:82:9
82 prior_check_in: true,
~~~~~~~~~~~~~~~~~~~~
'prior_check_in' is declared here.
```
---
```
β Test suite failed to run
Cannot find module 'src/auth/auth.guard' from 'attendees/attendees.controller.ts'
Require stack:
attendees/attendees.controller.ts
attendees/attendees.module.ts
app.module.ts
attendees/attendees.controller.spec.ts
24 | import { UpdateAttendeeDto } from './dto/update-attendee.dto';
25 | import { GenerateLotteryDto } from './dto/generate-lottery.dto';
> 26 | import { AuthGuard } from 'src/auth/auth.guard';
| ^
27 | import { WalletService } from '../wallet/wallet.service';
28 | import { JwtService } from '@nestjs/jwt';
29 | import { Request } from 'express';
at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11)
at Object.require (attendees/attendees.controller.ts:26:1)
at Object.require (attendees/attendees.module.ts:8:1)
at Object.require (app.module.ts:8:1)
at Object. (attendees/attendees.controller.spec.ts:10:1)
```
---
```
β Test suite failed to run
Cannot find module 'src/auth/auth.guard' from 'attendees/attendees.controller.ts'
Require stack:
attendees/attendees.controller.ts
attendees/attendees.module.ts
app.module.ts
events/events.service.spec.ts
24 | import { UpdateAttendeeDto } from './dto/update-attendee.dto';
25 | import { GenerateLotteryDto } from './dto/generate-lottery.dto';
> 26 | import { AuthGuard } from 'src/auth/auth.guard';
| ^
27 | import { WalletService } from '../wallet/wallet.service';
28 | import { JwtService } from '@nestjs/jwt';
29 | import { Request } from 'express';
at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11)
at Object.require (attendees/attendees.controller.ts:26:1)
at Object.require (attendees/attendees.module.ts:8:1)
at Object.require (app.module.ts:8:1)
at Object. (events/events.service.spec.ts:4:1)
```
---
```
β S3ModuleService βΊ should be defined
Nest can't resolve dependencies of the S3Service (S3Client, ?). Please make sure that the argument AttendeeService at index [1] is available in the RootTestModule context.
Potential solutions:
- Is RootTestModule a valid NestJS module?
- If AttendeeService is a provider, is it part of the current RootTestModule?
- If AttendeeService is exported from a separate @Module, is that module imported within RootTestModule?
@Module({
imports: [ /* the Module containing AttendeeService */ ]
})
7 |
8 | beforeEach(async () => {
> 9 | const module: TestingModule = await Test.createTestingModule({
| ^
10 | imports: [],
11 | providers: [{ provide: 'S3Client', useValue: new S3Client() }, S3Service],
12 | }).compile();
at TestingInjector.lookupComponentInParentModules (../node_modules/@nestjs/core/injector/injector.js:247:19)
at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/core/injector/injector.js:200:33)
at TestingInjector.resolveComponentInstance (../node_modules/@nestjs/testing/testing-injector.js:19:45)
at resolveParam (../node_modules/@nestjs/core/injector/injector.js:120:38)
at async Promise.all (index 1)
at TestingInjector.resolveConstructorParams (../node_modules/@nestjs/core/injector/injector.js:135:27)
at TestingInjector.loadInstance (../node_modules/@nestjs/core/injector/injector.js:61:13)
at TestingInjector.loadProvider (../node_modules/@nestjs/core/injector/injector.js:88:9)
at ../node_modules/@nestjs/core/injector/instance-loader.js:56:13
at async Promise.all (index 4)
at TestingInstanceLoader.createInstancesOfProviders (../node_modules/@nestjs/core/injector/instance-loader.js:55:9)
at ../node_modules/@nestjs/core/injector/instance-loader.js:40:13
at async Promise.all (index 1)
at TestingInstanceLoader.createInstances (../node_modules/@nestjs/core/injector/instance-loader.js:39:9)
at TestingInstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/core/injector/instance-loader.js:22:13)
at TestingInstanceLoader.createInstancesOfDependencies (../node_modules/@nestjs/testing/testing-instance-loader.js:9:9)
at TestingModuleBuilder.createInstancesOfDependencies (../node_modules/@nestjs/testing/testing-module.builder.js:97:9)
at TestingModuleBuilder.compile (../node_modules/@nestjs/testing/testing-module.builder.js:63:9)
at Object. (s3/s3.service.spec.ts:9:35)
```
Coverage report
β An unexpected error occurred. For more details, check console
Show new covered files π£
|
Show files with reduced coverage π»
|
Test suite run failed
Failed tests: 1/14. Failed suites: 4/15.
``` β Test suite failed to run src/events/events.controller.spec.ts:109:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. 109 .mockResolvedValueOnce(successResponse); ~~~~~~~~~~~~~~~ src/events/events.service.ts:82:9 82 prior_check_in: true, ~~~~~~~~~~~~~~~~~~~~ 'prior_check_in' is declared here. src/events/events.controller.spec.ts:167:30 - error TS2345: Argument of type '{ status: HttpStatus; message: string; priority: boolean; }' is not assignable to parameter of type '{ status: HttpStatus; message: string; priority?: undefined; prior_check_in?: undefined; } | { status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. Property 'prior_check_in' is missing in type '{ status: HttpStatus; message: string; priority: boolean; }' but required in type '{ status: HttpStatus; message: string; priority: boolean; prior_check_in: boolean; }'. 167 .mockResolvedValueOnce(successResponse); ~~~~~~~~~~~~~~~ src/events/events.service.ts:82:9 82 prior_check_in: true, ~~~~~~~~~~~~~~~~~~~~ 'prior_check_in' is declared here. ``` --- ``` β Test suite failed to run Cannot find module 'src/auth/auth.guard' from 'attendees/attendees.controller.ts' Require stack: attendees/attendees.controller.ts attendees/attendees.module.ts app.module.ts attendees/attendees.controller.spec.ts 24 | import { UpdateAttendeeDto } from './dto/update-attendee.dto'; 25 | import { GenerateLotteryDto } from './dto/generate-lottery.dto'; > 26 | import { AuthGuard } from 'src/auth/auth.guard'; | ^ 27 | import { WalletService } from '../wallet/wallet.service'; 28 | import { JwtService } from '@nestjs/jwt'; 29 | import { Request } from 'express'; at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (attendees/attendees.controller.ts:26:1) at Object.require (attendees/attendees.module.ts:8:1) at Object.require (app.module.ts:8:1) at Object.
Report generated by π§ͺjest coverage report action from fd01b8fb8262f72f193c5389c6f951a8b77eeb30