Incognito-Wiki/tests/no-matomo.test.mjs
2026-09-23 11:16:46 +02:00

16 lines
618 B
JavaScript

import assert from 'node:assert/strict';
import { access, readFile } from 'node:fs/promises';
import test from 'node:test';
test('the wiki contains no active Matomo tracking integration', async () => {
const [config, css, readme] = await Promise.all([
readFile('astro.config.mjs', 'utf8'),
readFile('src/styles/incognito.css', 'utf8'),
readFile('README.md', 'utf8'),
]);
assert.doesNotMatch(config, /matomo/i);
assert.doesNotMatch(css, /incognito-(?:analytics|consent|privacy-settings)/i);
assert.doesNotMatch(readme, /matomo/i);
await assert.rejects(access('public/matomo-consent.js'));
});