feat: integrate verified project evidence

This commit is contained in:
2026-09-02 16:46:22 +03:00
parent 132a7cd344
commit 5fee894490
3 changed files with 35 additions and 1 deletions

View File

@@ -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');
});
});