feat: add local workflow web console
This commit is contained in:
@@ -40,3 +40,26 @@ describe("workflow retry-execute arguments", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("workflow web arguments", () => {
|
||||
it("accepts no options", () => {
|
||||
expect(parseWorkflowArgs(["web"])).toEqual({
|
||||
sub: "web",
|
||||
port: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
it("accepts a custom port", () => {
|
||||
expect(parseWorkflowArgs(["web", "--port", "8080"])).toEqual({
|
||||
sub: "web",
|
||||
port: 8080,
|
||||
});
|
||||
});
|
||||
|
||||
it("throws on invalid port", () => {
|
||||
expect(() => parseWorkflowArgs(["web", "--port", "abc"])).toThrow();
|
||||
expect(() => parseWorkflowArgs(["web", "--port", "-1"])).toThrow();
|
||||
expect(() => parseWorkflowArgs(["web", "--port", "0"])).toThrow();
|
||||
expect(() => parseWorkflowArgs(["web", "--port", "70000"])).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user