ReflectionsProjections / rp-api-2023

Core Backend API Layer for Reflections | Projections 2023, powered by Nest.js
MIT License
0 stars 0 forks source link

Add Lottery Route #52

Closed aniketgargya closed 1 year ago

github-actions[bot] commented 1 year ago

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/opt/hostedtoolcache/node/16.20.2/x64/bin/npx' failed with exit code 1
St.:grey_question:
Category Percentage Covered / Total
πŸ”΄ Statements
31.32% (-28.26% πŸ”»)
269/859
πŸ”΄ Branches
3.76% (-3.76% πŸ”»)
5/133
πŸ”΄ Functions
15.13% (-7.95% πŸ”»)
18/119
πŸ”΄ Lines
29.13% (-27.81% πŸ”»)
229/786
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------- | :--------- | :------- | :-------- | :---- | | πŸ”΄ |
`...` / generate-lottery.dto.ts
| 0% | 100% | 100% | 0% |
Show files with reduced coverage πŸ”»
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------- | :------------------------------------------------------------- | :---------------------------------------------------------- | :-------------------------------------------------------------- | :-------------------------------------------------------------- | | πŸ”΄ |
`...` / attendees.service.ts
|
53.85% (-6.68% πŸ”»)
| 21.43% |
23.08% (-10.26% πŸ”»)
|
51.35% (-6.98% πŸ”»)
| | πŸ”΄ |
`...` / roles.service.ts
|
58.33% (-8.33% πŸ”»)
| 100% |
0% (-20% πŸ”»)
|
50% (-10% πŸ”»)
| | πŸ”΄ | s3/s3.service.ts |
22.58% (-9.68% πŸ”»)
| 0% |
0% (-25% πŸ”»)
|
17.24% (-10.34% πŸ”»)
| | πŸ”΄ | app.module.ts |
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / attendees.controller.ts
|
0% (-39.76% πŸ”»)
|
0% (-22.73% πŸ”»)
|
0% (-18.18% πŸ”»)
|
0% (-38.27% πŸ”»)
| | πŸ”΄ |
`...` / attendees.module.ts
|
0% (-100% πŸ”»)
| 100% |
0% (-100% πŸ”»)
|
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / email.module.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ | s3/s3.module.ts |
0% (-100% πŸ”»)
| 100% |
0% (-100% πŸ”»)
|
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / create-attendee.dto.ts
|
0% (-82.14% πŸ”»)
| 0% | 0% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / update-attendee.dto.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ | constants.ts |
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ | auth/auth.module.ts |
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ | carp/carp.module.ts |
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / events.module.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / events.controller.ts
|
0% (-47.46% πŸ”»)
| 0% |
0% (-10% πŸ”»)
|
0% (-45.61% πŸ”»)
| | πŸ”΄ |
`...` / events.service.ts
|
0% (-33.96% πŸ”»)
| 0% |
0% (-8.33% πŸ”»)
|
0% (-32% πŸ”»)
| | πŸ”΄ |
`...` / wallet.module.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / roles.module.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / create-event.dto.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / register-attendee.dto.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
| | πŸ”΄ |
`...` / update-event.dto.ts
|
0% (-100% πŸ”»)
| 100% | 100% |
0% (-100% πŸ”»)
|

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. (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) ```

Report generated by πŸ§ͺjest coverage report action from fd01b8fb8262f72f193c5389c6f951a8b77eeb30