@@ -13,7 +13,7 @@ describe('collapseKeys', () => {
13
13
'b.d' : 'hi' ,
14
14
'b.e.f' : false ,
15
15
} )
16
- assert . deepEqual ( collapseKeys ( { a : [ 1 , 2 , 3 , { b : 4 , c : [ ] , d : null , e : undefined } ] } ) , {
16
+ assert . deepEqual ( collapseKeys ( { a : [ 1 , 2 , 3 , { b : 4 , c : [ ] , d : null , e : undefined } ] } ) , {
17
17
'a.0' : 1 ,
18
18
'a.1' : 2 ,
19
19
'a.2' : 3 ,
@@ -42,13 +42,13 @@ describe('getFilteredSubs', () => {
42
42
const subscription = {
43
43
id : '1' ,
44
44
topic,
45
- filter : { } ,
45
+ filter : { } ,
46
46
subscriptionId : '1' ,
47
- subscription : { } as any ,
47
+ subscription : { } as any ,
48
48
connectionId : 'abcd' ,
49
49
connectionInitPayload : { } ,
50
50
requestContext : { } as any ,
51
- ttl : Date . now ( ) + 100000 ,
51
+ ttl : Math . floor ( Date . now ( ) / 1000 ) + 100000 ,
52
52
createdAt : Date . now ( ) ,
53
53
}
54
54
@@ -64,11 +64,11 @@ describe('getFilteredSubs', () => {
64
64
topic,
65
65
filter : { language : 'en' } ,
66
66
subscriptionId : '2' ,
67
- subscription : { } as any ,
67
+ subscription : { } as any ,
68
68
connectionId : 'abcd' ,
69
69
connectionInitPayload : { } ,
70
70
requestContext : { } as any ,
71
- ttl : Date . now ( ) + 100000 ,
71
+ ttl : Math . floor ( Date . now ( ) / 1000 ) + 100000 ,
72
72
createdAt : Date . now ( ) ,
73
73
}
74
74
@@ -86,11 +86,11 @@ describe('getFilteredSubs', () => {
86
86
topic,
87
87
filter : { language : 'en ' } ,
88
88
subscriptionId : '12345' ,
89
- subscription : { } as any ,
89
+ subscription : { } as any ,
90
90
connectionId : '1234' ,
91
91
connectionInitPayload : { } ,
92
92
requestContext : { } as any ,
93
- ttl : Date . now ( ) + 100000 ,
93
+ ttl : Math . floor ( Date . now ( ) / 1000 ) + 100000 ,
94
94
createdAt : Date . now ( ) ,
95
95
}
96
96
0 commit comments