test: cover permission denied message format
This commit is contained in:
1 parent
2c09130726
commit
50f33fa145
1 file changed
+10
@@ -0,0 +1,10 @@
|
|||||||
|
import assert from "node:assert/strict";
|
||||||
|
import test from "node:test";
|
||||||
|
import { formatPermissionDeniedMessage } from "../src/github/commandFeedback.js";
|
||||||
|
|
||||||
|
test("permission denied message names the commenter, command, and remedy", () => {
|
||||||
|
const message = formatPermissionDeniedMessage("alice", "/recheck");
|
||||||
|
assert.match(message, /@alice/);
|
||||||
|
assert.match(message, /`\/recheck`/);
|
||||||
|
assert.match(message, /write.*maintain.*admin|maintainer/i);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user