We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64147ef commit 88b4b35Copy full SHA for 88b4b35
src/array/for_each_pair.test.ts
@@ -13,12 +13,37 @@ Deno.test(
13
name: 'Empty array',
14
fn: () => {
15
function dummyFunction(
16
- previousValue,
17
- currentValue
18
- ) {}
+ previousValue : number,
+ currentValue : number
+ ) : void {}
19
+
20
const dummyFunctionSpy = spy(dummyFunction);
21
-
22
+ forEachPair(
23
+ [0, 2, 3, 7],
24
+ dummyFunctionSpy
25
+ )
26
27
+ assertSpyCall(dummyFunctionSpy, 0, {
28
+ args: [
29
+ 0,
30
+ 2
31
+ ]
32
+ })
33
+ assertSpyCall(dummyFunctionSpy, 1, {
34
35
+ 2,
36
+ 3
37
38
39
+ assertSpyCall(dummyFunctionSpy, 2, {
40
41
+ 3,
42
+ 7
43
44
45
46
+ assertSpyCalls(dummyFunctionSpy, 3);
47
}
48
})
49
0 commit comments