Skip to content

Commit

Permalink
tried to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-carlos-sousa committed Feb 14, 2024
1 parent 3ddbc60 commit 3f59392
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 24 deletions.
Empty file added NODE_ENV=test
Empty file.
Empty file added eslint
Empty file.
Empty file added [email protected]
Empty file.
Empty file added npm
Empty file.
2 changes: 0 additions & 2 deletions test/end-to-end/offer.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,11 @@ describe("Offer endpoint tests", () => {

describe("jobMinDuration", () => {
const FieldValidatorTester = BodyValidatorTester("jobMinDuration");
FieldValidatorTester.isRequired();
FieldValidatorTester.mustBeNumber();
});

describe("jobMaxDuration", () => {
const FieldValidatorTester = BodyValidatorTester("jobMaxDuration");
FieldValidatorTester.isRequired();
FieldValidatorTester.mustBeNumber();
FieldValidatorTester.mustBeGreaterThanOrEqualToField("jobMinDuration");
});
Expand Down
22 changes: 0 additions & 22 deletions test/offer_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,6 @@ describe("# Offer Schema tests", () => {
expect(err.errors.requirements).toHaveProperty("message", "There must be at least one requirement");
}
});

test("'jobMinDuration' is required", async () => {
const offer = new Offer({});
try {
await offer.validate();
} catch (err) {
expect(err.errors.jobMinDuration).toBeDefined();
expect(err.errors.jobMinDuration).toHaveProperty("kind", "required");
expect(err.errors.jobMinDuration).toHaveProperty("message", "Path `jobMinDuration` is required.");
}
});

test("'jobMaxDuration' is required", async () => {
const offer = new Offer({});
try {
await offer.validate();
} catch (err) {
expect(err.errors.jobMaxDuration).toBeDefined();
expect(err.errors.jobMaxDuration).toHaveProperty("kind", "required");
expect(err.errors.jobMaxDuration).toHaveProperty("message", "Path `jobMaxDuration` is required.");
}
});
});

describe("required using custom validators (checking for array lengths, etc)", () => {
Expand Down

0 comments on commit 3f59392

Please sign in to comment.