41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import {
|
|
fallbackCreditsContent,
|
|
isCreditsContent,
|
|
isLegalContent,
|
|
legalContent,
|
|
toolkitData,
|
|
} from '../src/data';
|
|
|
|
describe('credits data', () => {
|
|
it('provides valid fallback credits content', () => {
|
|
expect(isCreditsContent(fallbackCreditsContent)).toBe(true);
|
|
expect(fallbackCreditsContent.mainLogo.title).toBe('Throne of the Bone King');
|
|
expect(fallbackCreditsContent.contributors.length).toBeGreaterThan(0);
|
|
expect(fallbackCreditsContent.technologies.length).toBeGreaterThan(0);
|
|
expect(fallbackCreditsContent.specialThanks.length).toBeGreaterThan(0);
|
|
});
|
|
|
|
it('rejects malformed credits content', () => {
|
|
expect(
|
|
isCreditsContent({
|
|
contributors: [],
|
|
mainLogo: {
|
|
title: 'Missing subtitle',
|
|
},
|
|
specialThanks: [],
|
|
technologies: [],
|
|
}),
|
|
).toBe(false);
|
|
});
|
|
|
|
it('exports legal and toolkit data through the root data index', () => {
|
|
expect(isLegalContent(legalContent)).toBe(true);
|
|
expect(toolkitData.petitioners.length).toBeGreaterThan(0);
|
|
expect(toolkitData.rulings.length).toBeGreaterThan(0);
|
|
expect(toolkitData.map.settlements.length).toBeGreaterThan(0);
|
|
expect(toolkitData.credits.mainLogo.title).toBe('Throne of the Bone King');
|
|
expect(toolkitData.changelog.length).toBeGreaterThan(0);
|
|
expect(toolkitData.legal.pages.length).toBeGreaterThan(0);
|
|
});
|
|
});
|