release: WRNexusJS 0.5.10

This commit is contained in:
2026-07-30 13:36:29 +05:30
parent 8fc6f15402
commit d1b0c55b53
159 changed files with 7509 additions and 604 deletions
+16
View File
@@ -49,6 +49,22 @@ function fixture() {
}
describe("self-hosted CAPTCHA engine", () => {
test("random challenges resolve to an interactive challenge type", async () => {
const engine = createCaptchaEngine({
secret: "captcha-test-secret-with-at-least-thirty-two-characters",
store: new MemoryCaptchaStore(),
defaultType: "random",
minCompletionMs: 0,
});
const supported = new Set(["number", "alpha", "alphanumeric", "calculation", "image"]);
for (let index = 0; index < 12; index += 1) {
const challenge = await engine.create({ action: "random-check" });
expect(supported.has(challenge.type)).toBe(true);
expect(challenge.type).not.toBe("random");
}
});
test("creates, solves, and consumes a challenge and response token", async () => {
const { engine } = fixture();
const challenge = await engine.create({