569d887d1e
Renaming the package so any further PRs directed to the website are targeted to the reworked code instead of diverging. Once merged, I will start preparing this for deployment to dev to test before releasing to prod. Any improvements will also be applied to this package. I avoided making significant changes to API routes so nothing breaks, but will test it thoroughly today to confirm. That said, everything is ported - double checked. Big diff PR, impossible to review, but last one! No more rebuilds.
23 lines
793 B
TypeScript
23 lines
793 B
TypeScript
import { CASE_STUDY_CATALOG } from './case-study-catalog';
|
|
import { getCaseStudyAccent } from './case-study-palette';
|
|
import { CLIENT_LOGOS } from './client-logo-config';
|
|
|
|
describe('case-study catalog data', () => {
|
|
it('has unique slugs', () => {
|
|
const slugs = CASE_STUDY_CATALOG.map((entry) => entry.slug);
|
|
expect(slugs.length).toBeGreaterThan(0);
|
|
expect(new Set(slugs).size).toBe(slugs.length);
|
|
});
|
|
|
|
it('points every entry at a defined client logo', () => {
|
|
for (const entry of CASE_STUDY_CATALOG) {
|
|
expect(CLIENT_LOGOS[entry.clientIcon]).toBeDefined();
|
|
}
|
|
});
|
|
|
|
it('cycles four accents by catalog position', () => {
|
|
expect(getCaseStudyAccent(0)).toBe(getCaseStudyAccent(4));
|
|
expect(getCaseStudyAccent(0)).not.toBe(getCaseStudyAccent(1));
|
|
});
|
|
});
|