@crawlcheck/sdk 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/gen/openapi.d.ts +1 -1
- package/dist/index.js +9 -1
- package/dist/verify.js +4 -1
- package/package.json +1 -1
- package/test/fixtures/key-policy.json +390 -221
- package/test/tools.test.js +7 -0
package/test/tools.test.js
CHANGED
|
@@ -44,3 +44,10 @@ test("live: verify_fact returns a signed verdict that verifies", async () => {
|
|
|
44
44
|
if (r.ok) { assert.equal(r.kind, "crawlcheck-field-check"); assert.equal(r.verified, true); assert.ok(r.verdict); }
|
|
45
45
|
else assert.ok(r.why.length);
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
test("1.9.2: an unknown action fails closed (no fallback to read), without calling the API", async () => {
|
|
49
|
+
const r = await tools[0].execute({ site: "crawlcheck.io", action: "pay" });
|
|
50
|
+
assert.equal(r.proceed, false); assert.match(r.why[0], /unknown action: pay/);
|
|
51
|
+
const f = await tools[2].execute({ url: "https://crawlcheck.io/", action: "transact" });
|
|
52
|
+
assert.equal(f.proceed, false); assert.match(f.why[0], /unknown action/);
|
|
53
|
+
});
|