Skip to content

Commit fef8ffe

Browse files
committed
test: fix tests
1 parent 7b88cb1 commit fef8ffe

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Testing/execCmd.spec.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("execCmd", () => {
3030
};
3131

3232
const commands = cmd.batch(
33-
cmd.ofFunc.either(
33+
cmd.ofEither(
3434
func,
3535
() => ({ name: "Msg1" }),
3636
() => ({ name: "Error" }),
@@ -52,7 +52,7 @@ describe("execCmd", () => {
5252
};
5353

5454
const commands = cmd.batch(
55-
cmd.ofFunc.either(
55+
cmd.ofEither(
5656
func,
5757
() => ({ name: "Msg1" }),
5858
() => ({ name: "Error" }),
@@ -72,7 +72,7 @@ describe("execCmd", () => {
7272
const asyncFunc = async (): Promise<void> => undefined;
7373

7474
const commands = cmd.batch(
75-
cmd.ofPromise.either(
75+
cmd.ofEither(
7676
asyncFunc,
7777
() => ({ name: "Msg1" }),
7878
() => ({ name: "Error" }),
@@ -94,7 +94,7 @@ describe("execCmd", () => {
9494
};
9595

9696
const commands = cmd.batch(
97-
cmd.ofPromise.either(
97+
cmd.ofEither(
9898
asyncFunc,
9999
() => ({ name: "Msg1" }),
100100
() => ({ name: "Error" }),
@@ -113,7 +113,7 @@ describe("execCmd", () => {
113113
// arrange
114114
const asyncFunc = async (): Promise<void> => undefined;
115115

116-
const commands = cmd.ofPromise.attempt(asyncFunc, () => ({
116+
const commands = cmd.ofError(asyncFunc, () => ({
117117
name: "Error",
118118
}));
119119

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

133-
const commands = cmd.ofPromise.attempt(asyncFunc, () => ({
133+
const commands = cmd.ofError(asyncFunc, () => ({
134134
name: "Error",
135135
}));
136136

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

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

150150
// act
151151
const messages = await execCmd(commands);
@@ -160,7 +160,7 @@ describe("execCmd", () => {
160160
throw new Error("fail");
161161
};
162162

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

165165
// act
166166
const messages = await execCmd(commands);
@@ -175,7 +175,7 @@ describe("execCmd", () => {
175175
// blank
176176
};
177177

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

180180
// act
181181
const messages = await execCmd(commands);
@@ -190,7 +190,7 @@ describe("execCmd", () => {
190190
throw new Error("fail");
191191
};
192192

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

195195
// act
196196
const messages = await execCmd(commands);
@@ -205,7 +205,7 @@ describe("execCmd", () => {
205205
// blank
206206
};
207207

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

210210
// act
211211
const messages = await execCmd(commands);
@@ -220,7 +220,7 @@ describe("execCmd", () => {
220220
throw new Error("fail");
221221
};
222222

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

225225
// act
226226
const messages = await execCmd(commands);

0 commit comments

Comments
 (0)