release: WRNexusJS 0.4.0
This commit is contained in:
@@ -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 {");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user