Skip to content

Commit 85a9179

Browse files
committed
Update for_each_pair.test.ts
1 parent 413a3ef commit 85a9179

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

src/array/for_each_pair.test.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ import {
66
import forEachPair from "./for_each_pair.ts";
77

88
Deno.test(
9-
'Remove duplicates from array.',
9+
'Call function for each pair.',
1010
async (test) => {
1111
await test.step({
1212
name: 'Empty array',
1313
fn: () => {
1414
function dummyFunction(
1515
previousValue : number,
1616
currentValue : number
17-
) : {
18-
previousValue : number,
19-
currentValue : number
20-
} { return {
21-
previousValue, currentValue
22-
}}
17+
) : void {}
2318

2419
const dummyFunctionSpy = spy(dummyFunction);
2520

@@ -32,31 +27,19 @@ Deno.test(
3227
args: [
3328
0,
3429
2
35-
],
36-
returned: {
37-
currentValue: 0,
38-
previousValue: 2
39-
}
30+
]
4031
})
4132
assertSpyCall(dummyFunctionSpy, 1, {
4233
args: [
4334
2,
4435
3
45-
],
46-
returned: {
47-
currentValue: 2,
48-
previousValue: 3
49-
}
36+
]
5037
})
5138
assertSpyCall(dummyFunctionSpy, 2, {
5239
args: [
5340
3,
5441
7
55-
],
56-
returned: {
57-
currentValue: 3,
58-
previousValue: 7
59-
}
42+
]
6043
})
6144

6245
assertSpyCalls(dummyFunctionSpy, 3);

0 commit comments

Comments
 (0)