test: fail when the desktop repo's policy schema differs from the webmail's

This commit is contained in:
Linus Rath
2026-11-03 11:02:52 +01:00
parent fcf31df928
commit 333c758efa
@@ -44,6 +44,16 @@ describe('the committed templates', () => {
});
});
describe('the desktop repo', () => {
// Only in a checkout with repos/desktop next to the code. CI's desktop repo has no webmail beside it.
const copy = path.join(process.cwd(), 'repos', 'desktop', 'src', 'shared', 'policy-schema.ts');
it.runIf(existsSync(copy))('holds the same schema: run node scripts/generate-desktop-policies.mjs --shell repos/desktop', () => {
const text = (file: string) => readFileSync(file, 'utf8').replace(/\r\n/g, '\n');
expect(text(copy)).toBe(text(path.join(process.cwd(), 'lib', 'desktop', 'policy-schema.ts')));
});
});
describe('the ADMX', () => {
const doc = parseXml(generateAdmx());
const root = doc.documentElement;