generated from nhcarrigan/template
34 lines
876 B
TypeScript
34 lines
876 B
TypeScript
|
/**
|
||
|
* @copyright nhcarrigan
|
||
|
* @license Naomi's Public License
|
||
|
* @author Naomi Carrigan
|
||
|
*/
|
||
|
import { describe, it, expect } from "vitest";
|
||
|
import { Jobs } from "../../src/config/Jobs";
|
||
|
|
||
|
describe("jobs objects", () => {
|
||
|
it("should have correct start dates", () => {
|
||
|
expect.hasAssertions();
|
||
|
for (const job of Jobs.slice(1)) {
|
||
|
expect(job.start.getDate(), `${job.title} has bad start`).toBe(5);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
it("should have correct end dates", () => {
|
||
|
expect.hasAssertions();
|
||
|
for (const job of Jobs.slice(1)) {
|
||
|
if (!job.end) {
|
||
|
continue;
|
||
|
}
|
||
|
expect(job.end.getDate(), `${job.title} has bad end`).toBe(5);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
it("should have no future start dates", () => {
|
||
|
expect.hasAssertions();
|
||
|
expect(Jobs.filter((job) => {
|
||
|
return job.start > new Date();
|
||
|
}), "have future start dates").toHaveLength(0);
|
||
|
});
|
||
|
});
|