Skip to content

Commit

Permalink
deno fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Maj committed Jun 5, 2024
1 parent cfb79cb commit e8b5d2e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const BaseProtocol = function (args: string[]): Protocol {
* @param args command-line arguments passed to this process
* @returns {Protocol}
*/
export const MessageBoundaryProtocol = function (args: string[]): Required<Pick<Protocol, 'getCLIFlags'>> & Protocol {
export const MessageBoundaryProtocol = function (
args: string[],
): Required<Pick<Protocol, "getCLIFlags">> & Protocol {
const { boundary } = parse(
args,
);
Expand Down
17 changes: 10 additions & 7 deletions src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ Deno.test("MessageBoundaryProtocol", async (t) => {
globalThis.console.log = origLog;
},
);
await t.step("should return a `getCLIFlags` method that returns correct --protocol and --boundary flags", () => {
const providedFlags = ["--boundary=12345"];
const prot = MessageBoundaryProtocol(providedFlags);
const flags = prot.getCLIFlags();
assertMatch(flags[0], /message-boundaries/);
assertEquals(flags[1], providedFlags[0]);
});
await t.step(
"should return a `getCLIFlags` method that returns correct --protocol and --boundary flags",
() => {
const providedFlags = ["--boundary=12345"];
const prot = MessageBoundaryProtocol(providedFlags);
const flags = prot.getCLIFlags();
assertMatch(flags[0], /message-boundaries/);
assertEquals(flags[1], providedFlags[0]);
},
);
});

Deno.test("getProtocolInterface()", async (t) => {
Expand Down

0 comments on commit e8b5d2e

Please sign in to comment.