release: WRNexusJS 0.4.0

This commit is contained in:
2026-07-27 12:42:18 +05:30
parent 8b728a3e5d
commit 30e5721e84
250 changed files with 10065 additions and 3923 deletions
+33 -4
View File
@@ -10,10 +10,38 @@ test("Captcha.wrn parses and exposes the full public contract", async () => {
const ast = parse(source);
expect(ast.kind).toBe("component");
expect(ast.name).toBe("Captcha");
for (const prop of ["provider", "siteKey", "type", "action", "presentation", "difficulty", "disturbance", "imageStyle", "allowedStyles", "excludedStyles", "randomizeStyle", "size", "color", "class", "showListen"]) {
for (const prop of [
"provider",
"siteKey",
"type",
"action",
"presentation",
"difficulty",
"disturbance",
"imageStyle",
"allowedStyles",
"excludedStyles",
"randomizeStyle",
"size",
"color",
"class",
"showListen",
]) {
expect(source).toContain(`${prop} =`);
}
for (const event of ["ready", "challenge", "input", "verify", "success", "failure", "expired", "refresh", "audioStart", "audioEnd", "error"]) {
for (const event of [
"ready",
"challenge",
"input",
"verify",
"success",
"failure",
"expired",
"refresh",
"audioStart",
"audioEnd",
"error",
]) {
expect(source).toContain(`@event ${event} = function`);
}
expect(source).toContain("data-captcha-disturbance='{disturbance}'");
@@ -32,7 +60,8 @@ test("Captcha.wrn parses and exposes the full public contract", async () => {
expect(source).toContain("{...attrs}");
expect(source).toContain("--wire-");
expect(source).not.toMatch(/=\{/);
expect(source).toContain('src="/assets/wrnexus/captcha.js"');
expect(source).not.toContain('src="/__wrnexus/captcha.js"');
expect(source).toContain('data-wrnexus-runtime="captcha"');
expect(source).not.toContain("<script");
expect(source).not.toContain("captcha.js");
expect(source).not.toContain("lifecycle {");
});