generated from nhcarrigan/template
chore: clean up a bunch of stuff that moved to static pages (#3)
Node.js CI / Lint and Test (push) Successful in 2m44s
Node.js CI / Lint and Test (push) Successful in 2m44s
### Explanation _No response_ ### Issue _No response_ ### Attestations - [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [ ] I have pinned the dependencies to a specific patch version. ### Style - [ ] I have run the linter and resolved any errors. - [ ] My pull request uses an appropriate title, matching the conventional commit standards. - [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning _No response_ Reviewed-on: #3 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit was merged in pull request #3.
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