generated from nhcarrigan/template
chore: clean up a bunch of stuff that moved to static pages
Node.js CI / Lint and Test (pull_request) Failing after 1m2s
Node.js CI / Lint and Test (pull_request) Failing after 1m2s
Also separate the landing page into two different things for me and my org.
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { Certifications } from "../../src/config/Certifications";
|
||||
|
||||
describe("certification objects", () => {
|
||||
it("should have unique names", () => {
|
||||
expect.assertions(1);
|
||||
const set = new Set(
|
||||
Certifications.map((c) => {
|
||||
return c.name;
|
||||
}),
|
||||
);
|
||||
expect(set, "are not unique").toHaveLength(Certifications.length);
|
||||
});
|
||||
|
||||
it("should have unique file names", () => {
|
||||
expect.assertions(1);
|
||||
const set = new Set(
|
||||
Certifications.map((c) => {
|
||||
return c.fileName;
|
||||
}),
|
||||
);
|
||||
expect(set, "are not unique").toHaveLength(Certifications.length);
|
||||
});
|
||||
});
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* @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);
|
||||
});
|
||||
});
|
||||
@@ -4,20 +4,21 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { NavItems } from "../../src/config/NavItems";
|
||||
import { NaomiNavItems, NavItems } from "../../src/config/NavItems";
|
||||
|
||||
describe("nav items", () => {
|
||||
it("should be unique", () => {
|
||||
expect.assertions(2);
|
||||
const concat = [ ...NavItems, ...NaomiNavItems ];
|
||||
const href = new Set(
|
||||
NavItems.map((n) => {
|
||||
concat.map((n) => {
|
||||
return n.href;
|
||||
}),
|
||||
);
|
||||
const text = new Set(NavItems.map((n) => {
|
||||
const text = new Set(concat.map((n) => {
|
||||
return n.text;
|
||||
}));
|
||||
expect(href, "links are not unique").toHaveLength(NavItems.length);
|
||||
expect(text, "names are not unique").toHaveLength(NavItems.length);
|
||||
expect(href, "links are not unique").toHaveLength(concat.length);
|
||||
expect(text, "names are not unique").toHaveLength(concat.length);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { Projects } from "../../src/config/Projects";
|
||||
|
||||
describe("project objects", () => {
|
||||
it("should have unique names", () => {
|
||||
expect.assertions(1);
|
||||
const set = new Set(
|
||||
Projects.map((a) => {
|
||||
return a.name;
|
||||
}),
|
||||
);
|
||||
expect(set, "are not unique").toHaveLength(Projects.length);
|
||||
});
|
||||
|
||||
it("should have unique URLs", () => {
|
||||
expect.assertions(1);
|
||||
const set = new Set(
|
||||
Projects.map((a) => {
|
||||
return a.url;
|
||||
}),
|
||||
);
|
||||
expect(set, "are not unique").toHaveLength(Projects.length);
|
||||
});
|
||||
});
|
||||
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { Testimonials } from "../../src/config/Testimonials";
|
||||
|
||||
describe("testimonial objects", () => {
|
||||
it("should have unique names", () => {
|
||||
expect.assertions(1);
|
||||
const set = new Set(
|
||||
Testimonials.map((t) => {
|
||||
return t.name;
|
||||
}),
|
||||
);
|
||||
expect(set, "are not unique").toHaveLength(Testimonials.length);
|
||||
});
|
||||
|
||||
it("should have no future dates", () => {
|
||||
expect.assertions(1);
|
||||
expect(Testimonials.filter((t) => {
|
||||
return new Date(t.date) > new Date();
|
||||
}), "have future dates").toHaveLength(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user