Skip to content

Commit

Permalink
Add mocha tests for ValidateAction.
Browse files Browse the repository at this point in the history
- Add new test for validate jobs to check for required parameters
  in both POST and PATCH operations
- Remove some unused TestData which didn't match the current Job DTOs
- Add 'validate' job to the test jobconfig.json
  • Loading branch information
sbliven committed Oct 10, 2024
1 parent 60372a0 commit ea08879
Show file tree
Hide file tree
Showing 5 changed files with 420 additions and 366 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Thank you for your interest in contributing to our project!
1. **Running the unit tests:** `npm run test`
2. **Running the e2e(api) tests:**

- First of all run `npm run prepare:local` to prepare the local environment for starting
- First of all run `npm run prepare:local` to prepare the local docker environment for starting
- After that run `npm run test:api` which will start the backend locally and run both `jest` and `mocha` e2e(api) tests.
- [Optional] If you want to run only the mocha tests you will need to start the backend locally with `npm run start` and then use `npm run test:api:mocha`
- [Optional] If you want to run only the jest tests you can use `npm run test:api:jest`
Expand Down
4 changes: 0 additions & 4 deletions src/jobs/dto/create-job.dto.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { ApiProperty, ApiTags } from "@nestjs/swagger";
import { IsEmail, IsObject, IsOptional, IsString } from "class-validator";
import { JobConfig } from "../config/jobconfig";

export type CreateJobDtoWithConfig = CreateJobDto & {
configuration: JobConfig;
};
@ApiTags("jobs")
export class CreateJobDto {
@ApiProperty({
Expand Down
Loading

0 comments on commit ea08879

Please sign in to comment.