19 lines
764 B
JavaScript
19 lines
764 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { readFile } from 'node:fs/promises';
|
|
import test from 'node:test';
|
|
|
|
const forbidden = [/\[\[/, /\{\{/, /~~NOCACHE~~/, /NEWPAGE>/, /indexmenu>/];
|
|
|
|
for (const file of [
|
|
'src/content/docs/bachelor/index.md',
|
|
'src/content/docs/bachelor/year-1/index.md',
|
|
'src/content/docs/bachelor/year-1/project-1-1.md',
|
|
'src/content/docs/bachelor/year-1/project-1-2.md',
|
|
]) {
|
|
test(`${file} contains clean migrated Markdown`, async () => {
|
|
const content = await readFile(file, 'utf8');
|
|
assert.match(content, /^---\n[\s\S]*title:/);
|
|
assert.match(content, /This information originated in the previous wiki and may be outdated\./);
|
|
for (const pattern of forbidden) assert.doesNotMatch(content, pattern);
|
|
});
|
|
}
|