Float glass header and document moderator applications
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 6m16s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 6m16s
This commit is contained in:
19
tests/player-docs.test.ts
Normal file
19
tests/player-docs.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile } from "node:fs/promises";
|
||||
import test from "node:test";
|
||||
import guides from "../shared/player-docs.json";
|
||||
|
||||
test("moderator application guide matches GitBook and includes both bot routes", async () => {
|
||||
const guide = guides.find((item) => item.slug === "staff");
|
||||
assert.ok(guide);
|
||||
const gitbook = await readFile("docs/gitbook/staff.md", "utf8");
|
||||
assert.equal(guide.markdown.trim(), gitbook.trim());
|
||||
assert.match(guide.markdown, /## Apply to be a moderator/);
|
||||
assert.match(guide.markdown, /send it a direct message/);
|
||||
assert.match(guide.markdown, /Select \*\*Apply for moderator\*\*/);
|
||||
assert.match(guide.markdown, /within \*\*30 minutes\*\*/);
|
||||
assert.match(
|
||||
guide.markdown,
|
||||
/\[open @MineGeoModeratorBot\]\(https:\/\/t\.me\/MineGeoModeratorBot\)/,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user