merge main into the workflow editor branch (#2061)
This commit is contained in:
39 files changed
+4372
-547
No files matched your search
@@ -10,13 +10,12 @@ import {
|
||||
import { describeTimelineEvent } from "../src/tasks/timeline-event.ts";
|
||||
|
||||
test("a capture shows how it may dispatch", () => {
|
||||
const cases: Array<
|
||||
[{ authenticated?: boolean; unsigned?: boolean }, string, string]
|
||||
> = [
|
||||
[{ authenticated: true }, "Signed", "ok"],
|
||||
[{ unsigned: true }, "Unsigned", "warn"],
|
||||
const cases: Array<[{ verification?: string }, string, string]> = [
|
||||
[{ verification: "signed" }, "Signed", "ok"],
|
||||
[{ verification: "token" }, "Token", "ok"],
|
||||
[{ verification: "unsigned" }, "Unsigned", "warn"],
|
||||
[{}, "Unverified", "idle"],
|
||||
[{ authenticated: false, unsigned: false }, "Unverified", "idle"],
|
||||
[{ verification: "" }, "Unverified", "idle"],
|
||||
];
|
||||
for (const [capture, label, kind] of cases) {
|
||||
assert.deepEqual(
|
||||
@@ -30,6 +29,7 @@ test("a capture shows how it may dispatch", () => {
|
||||
test("a source's signing state names itself and its tone", () => {
|
||||
const cases: Array<[string | undefined, string, string]> = [
|
||||
["signed", "signed", "ok"],
|
||||
["token", "bearer token", "ok"],
|
||||
["unsigned_pending_approval", "unsigned pending approval", "info"],
|
||||
["unsigned", "unsigned", "warn"],
|
||||
["something_new", "something_new", "idle"],
|
||||
@@ -44,9 +44,9 @@ test("a source's signing state names itself and its tone", () => {
|
||||
test("a source's URL escapes nothing a valid path can hold", () => {
|
||||
assert.equal(
|
||||
sourceURL("https://archie.example", "0199a0b2-0000-7000-8000-000000000000"),
|
||||
"https://archie.example/webhooks/capture/0199a0b2-0000-7000-8000-000000000000",
|
||||
"https://archie.example/hooks/0199a0b2-0000-7000-8000-000000000000",
|
||||
);
|
||||
assert.equal(sourceURL("http://h", "a b"), "http://h/webhooks/capture/a%20b");
|
||||
assert.equal(sourceURL("http://h", "a b"), "http://h/hooks/a%20b");
|
||||
});
|
||||
|
||||
test("a task started by an unsigned event says so on its timeline", () => {
|
||||
|
||||
Reference in new issue
Block a user