// Loads the git-ignored list of specifics that must never reach the site. Without the file // (a fresh clone, CI) the generic rules in the tests still run, and a note says what was skipped. import { readFileSync } from 'node:fs' const FILE = new URL('./banned.private.json', import.meta.url) let loaded = { patterns: [], questions: [], answerPattern: null } let present = false try { loaded = { ...loaded, ...JSON.parse(readFileSync(FILE, 'utf8')) } present = true } catch (e) { console.warn( 'note: test/banned.private.json not found; private content checks skipped' ) } export const privatePresent = present export const privatePatterns = loaded.patterns.map(([source, why]) => [ new RegExp(source, 'i'), why, ]) export const privateQuestions = loaded.questions export const privateAnswerPattern = loaded.answerPattern ? new RegExp(loaded.answerPattern, 'i') : null