feat: integrate verified project evidence
This commit is contained in:
@@ -51,4 +51,34 @@ describe('approved public portfolio projection', () => {
|
||||
});
|
||||
expect(JSON.stringify(content)).not.toMatch(/Arch Linux|CV download|heatmap|expert|percent/i);
|
||||
});
|
||||
|
||||
it('publishes only the four verified owner repositories and no private project links', async () => {
|
||||
const { content } = validateProductionInputs(
|
||||
await readJson('content/public/portfolio-content.json'),
|
||||
await readJson('content/public/asset-manifest.json'),
|
||||
await readJson('config/site.preview.json'),
|
||||
new URL('file:///prepared-assets/'),
|
||||
);
|
||||
const expected = new Map([
|
||||
['footy-tracker', 'https://github.com/LucaPisl/footy-tracker'],
|
||||
['opinion-dynamics-simulation', 'https://github.com/LucaPisl/opinion-dynamics-simulation'],
|
||||
['currency-converter', 'https://github.com/LucaPisl/CurrencyConverterAvalonia'],
|
||||
['linux-modding-guide', 'https://github.com/LucaPisl/LinuxModdingGuide'],
|
||||
]);
|
||||
const projects = [...content.projects.selected, ...content.projects.additional];
|
||||
|
||||
expect(new Map(projects.flatMap((project) => project.url === undefined ? [] : [[project.id, project.url]]))).toEqual(expected);
|
||||
for (const project of projects) {
|
||||
if (project.visibility === 'private') expect(project.url).toBeUndefined();
|
||||
if (project.url !== undefined) {
|
||||
const url = new URL(project.url);
|
||||
expect(url.protocol).toBe('https:');
|
||||
expect(url.hostname).toBe('github.com');
|
||||
expect(url.pathname.startsWith('/LucaPisl/')).toBe(true);
|
||||
expect(url.search).toBe('');
|
||||
expect(url.hash).toBe('');
|
||||
}
|
||||
}
|
||||
expect(JSON.stringify(content)).not.toContain('CurrencyConverterAvaloniaProject');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user