@@ -9,8 +9,8 @@ const daprAppId = 'test-suite';
9
9
describe ( 'grpc/main' , ( ) => {
10
10
let server : DaprServer ;
11
11
let client : DaprClient ;
12
- const mockBindingReceive = jest . fn ( async ( data : object ) => console . log ( 'mockBindingReceive' ) ) ;
13
- const mockPubSubSubscribe = jest . fn ( async ( data : object ) => console . log ( 'mockPubSubSubscribe' ) ) ;
12
+ const mockBindingReceive = jest . fn ( async ( _data : object ) => console . log ( 'mockBindingReceive' ) ) ;
13
+ const mockPubSubSubscribe = jest . fn ( async ( _data : object ) => console . log ( 'mockPubSubSubscribe' ) ) ;
14
14
15
15
// We need to start listening on some endpoints already
16
16
// this because Dapr is not dynamic and registers endpoints on boot
@@ -34,7 +34,7 @@ describe('grpc/main', () => {
34
34
35
35
describe ( 'metadata' , ( ) => {
36
36
it ( 'should be able to get the metadata of the Dapr sidecar' , async ( ) => {
37
- const res = await client . metadata . get ( ) ;
37
+ await client . metadata . get ( ) ;
38
38
39
39
// app id is not set in grpc?
40
40
// expect(res.id.length).toBeGreaterThan(0);
@@ -66,7 +66,7 @@ describe('grpc/main', () => {
66
66
await client . binding . send ( 'binding-mqtt' , 'create' , { hello : 'world' } ) ;
67
67
68
68
// Delay a bit for event to arrive
69
- await new Promise ( ( resolve , reject ) => setTimeout ( resolve , 250 ) ) ;
69
+ await new Promise ( ( resolve , _reject ) => setTimeout ( resolve , 250 ) ) ;
70
70
expect ( mockBindingReceive . mock . calls . length ) . toBe ( 1 ) ;
71
71
72
72
// Also test for receiving data
@@ -80,7 +80,7 @@ describe('grpc/main', () => {
80
80
await client . pubsub . publish ( 'pubsub-redis' , 'test-topic' , { hello : 'world' } ) ;
81
81
82
82
// Delay a bit for event to arrive
83
- await new Promise ( ( resolve , reject ) => setTimeout ( resolve , 250 ) ) ;
83
+ await new Promise ( ( resolve , _reject ) => setTimeout ( resolve , 250 ) ) ;
84
84
85
85
expect ( mockPubSubSubscribe . mock . calls . length ) . toBe ( 1 ) ;
86
86
@@ -97,7 +97,7 @@ describe('grpc/main', () => {
97
97
98
98
describe ( 'invoker' , ( ) => {
99
99
it ( 'should be able to listen and invoke a service with GET' , async ( ) => {
100
- const mock = jest . fn ( async ( data : object ) => ( { hello : 'world' } ) ) ;
100
+ const mock = jest . fn ( async ( _data : object ) => ( { hello : 'world' } ) ) ;
101
101
102
102
await server . invoker . listen ( 'hello-world' , mock , { method : HttpMethod . GET } ) ;
103
103
const res = await client . invoker . invoke ( daprAppId , 'hello-world' , HttpMethod . GET ) ;
@@ -110,7 +110,7 @@ describe('grpc/main', () => {
110
110
} ) ;
111
111
112
112
it ( 'should be able to listen and invoke a service with POST data' , async ( ) => {
113
- const mock = jest . fn ( async ( data : object ) => ( { hello : 'world' } ) ) ;
113
+ const mock = jest . fn ( async ( _data : object ) => ( { hello : 'world' } ) ) ;
114
114
115
115
await server . invoker . listen ( 'hello-world' , mock , { method : HttpMethod . POST } ) ;
116
116
const res = await client . invoker . invoke ( daprAppId , 'hello-world' , HttpMethod . POST , {
0 commit comments