-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DR-750 Add back unit test suite #398
base: develop
Are you sure you want to change the base?
Conversation
…R-750_Unit_Test
…R-750_Unit_Test
…R-750_Unit_Test
Hey @Aish1990 I updated the PR description to be more clear. Could you address the failing linters? |
Hey @Aish1990 you have syntax errors in the YAML files. Could you please fix them? |
apps/drec-api/src/index.spec.ts
Outdated
@@ -0,0 +1,127 @@ | |||
/* eslint-disable @typescript-eslint/no-empty-function */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use file-wide eslint-disable
. If you need to disable it, please do so for the line that cannot be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sir, actually it's like left empty intentionally...
IsISO31661Alpha2: jest.fn(() => (target: any, propertyKey: string) => {}),
IsString: jest.fn(() => (target: any, propertyKey: string) => {}),
IsEmail: jest.fn(() => (target: any, propertyKey: string) => {}),
IsOptional: jest.fn(() => (target: any, propertyKey: string) => {}),
IsArray: jest.fn(() => (target: any, propertyKey: string) => {}),
IsNotEmpty: jest.fn(() => (target: any, propertyKey: string) => {}),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand. But I'm talking about file-wide ignore.
Please use
jest.mock('class-validator', () => ({
// eslint-disable-next-line no-empty-function
IsISO31661Alpha2: jest.fn(() => (target: any, propertyKey: string) => {}),
// eslint-disable-next-line no-empty-function
IsString: jest.fn(() => (target: any, propertyKey: string) => {}),
// eslint-disable-next-line no-empty-function
IsEmail: jest.fn(() => (target: any, propertyKey: string) => {}),
// eslint-disable-next-line no-empty-function
IsOptional: jest.fn(() => (target: any, propertyKey: string) => {}),
// eslint-disable-next-line no-empty-function
IsArray: jest.fn(() => (target: any, propertyKey: string) => {}),
// eslint-disable-next-line no-empty-function
IsNotEmpty: jest.fn(() => (target: any, propertyKey: string) => {}),
}));
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay sir...
…R-750_Unit_Test
Steps:
Definition of done: Every Pull-Request should check that the unit tests are passing. The unit tests should achieve a high code coverage (70% or more).