File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -6,20 +6,15 @@ import {
6
6
import forEachPair from "./for_each_pair.ts" ;
7
7
8
8
Deno . test (
9
- 'Remove duplicates from array .' ,
9
+ 'Call function for each pair .' ,
10
10
async ( test ) => {
11
11
await test . step ( {
12
12
name : 'Empty array' ,
13
13
fn : ( ) => {
14
14
function dummyFunction (
15
15
previousValue : number ,
16
16
currentValue : number
17
- ) : {
18
- previousValue : number ,
19
- currentValue : number
20
- } { return {
21
- previousValue, currentValue
22
- } }
17
+ ) : void { }
23
18
24
19
const dummyFunctionSpy = spy ( dummyFunction ) ;
25
20
@@ -32,31 +27,19 @@ Deno.test(
32
27
args : [
33
28
0 ,
34
29
2
35
- ] ,
36
- returned : {
37
- currentValue : 0 ,
38
- previousValue : 2
39
- }
30
+ ]
40
31
} )
41
32
assertSpyCall ( dummyFunctionSpy , 1 , {
42
33
args : [
43
34
2 ,
44
35
3
45
- ] ,
46
- returned : {
47
- currentValue : 2 ,
48
- previousValue : 3
49
- }
36
+ ]
50
37
} )
51
38
assertSpyCall ( dummyFunctionSpy , 2 , {
52
39
args : [
53
40
3 ,
54
41
7
55
- ] ,
56
- returned : {
57
- currentValue : 3 ,
58
- previousValue : 7
59
- }
42
+ ]
60
43
} )
61
44
62
45
assertSpyCalls ( dummyFunctionSpy , 3 ) ;
You can’t perform that action at this time.
0 commit comments