Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atheck committed Nov 1, 2024
1 parent 7b88cb1 commit fef8ffe
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Testing/execCmd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("execCmd", () => {
};

const commands = cmd.batch(
cmd.ofFunc.either(
cmd.ofEither(
func,
() => ({ name: "Msg1" }),
() => ({ name: "Error" }),
Expand All @@ -52,7 +52,7 @@ describe("execCmd", () => {
};

const commands = cmd.batch(
cmd.ofFunc.either(
cmd.ofEither(
func,
() => ({ name: "Msg1" }),
() => ({ name: "Error" }),
Expand All @@ -72,7 +72,7 @@ describe("execCmd", () => {
const asyncFunc = async (): Promise<void> => undefined;

const commands = cmd.batch(
cmd.ofPromise.either(
cmd.ofEither(
asyncFunc,
() => ({ name: "Msg1" }),
() => ({ name: "Error" }),
Expand All @@ -94,7 +94,7 @@ describe("execCmd", () => {
};

const commands = cmd.batch(
cmd.ofPromise.either(
cmd.ofEither(
asyncFunc,
() => ({ name: "Msg1" }),
() => ({ name: "Error" }),
Expand All @@ -113,7 +113,7 @@ describe("execCmd", () => {
// arrange
const asyncFunc = async (): Promise<void> => undefined;

const commands = cmd.ofPromise.attempt(asyncFunc, () => ({
const commands = cmd.ofError(asyncFunc, () => ({
name: "Error",
}));

Expand All @@ -130,7 +130,7 @@ describe("execCmd", () => {
throw new Error("error");
};

const commands = cmd.ofPromise.attempt(asyncFunc, () => ({
const commands = cmd.ofError(asyncFunc, () => ({
name: "Error",
}));

Expand All @@ -145,7 +145,7 @@ describe("execCmd", () => {
// arrange
const asyncFunc = async (): Promise<void> => undefined;

const commands = cmd.ofPromise.perform(asyncFunc, () => ({ name: "Msg1" }));
const commands = cmd.ofSuccess(asyncFunc, () => ({ name: "Msg1" }));

// act
const messages = await execCmd(commands);
Expand All @@ -160,7 +160,7 @@ describe("execCmd", () => {
throw new Error("fail");
};

const commands = cmd.ofPromise.perform(asyncFunc, (): Message => ({ name: "Msg1" }));
const commands = cmd.ofSuccess(asyncFunc, (): Message => ({ name: "Msg1" }));

// act
const messages = await execCmd(commands);
Expand All @@ -175,7 +175,7 @@ describe("execCmd", () => {
// blank
};

const commands = cmd.ofFunc.attempt(func, () => ({ name: "Error" }));
const commands = cmd.ofError(func, () => ({ name: "Error" }));

// act
const messages = await execCmd(commands);
Expand All @@ -190,7 +190,7 @@ describe("execCmd", () => {
throw new Error("fail");
};

const commands = cmd.ofFunc.attempt(func, () => ({ name: "Error" }));
const commands = cmd.ofError(func, () => ({ name: "Error" }));

// act
const messages = await execCmd(commands);
Expand All @@ -205,7 +205,7 @@ describe("execCmd", () => {
// blank
};

const commands = cmd.ofFunc.perform(func, () => ({ name: "Msg1" }));
const commands = cmd.ofSuccess(func, () => ({ name: "Msg1" }));

// act
const messages = await execCmd(commands);
Expand All @@ -220,7 +220,7 @@ describe("execCmd", () => {
throw new Error("fail");
};

const commands = cmd.ofFunc.perform(func, (): Message => ({ name: "Msg1" }));
const commands = cmd.ofSuccess(func, (): Message => ({ name: "Msg1" }));

// act
const messages = await execCmd(commands);
Expand Down

0 comments on commit fef8ffe

Please sign in to comment.