Skip to content

Commit f578282

Browse files
committed
Fix linting partial
Signed-off-by: Shubham Sharma <[email protected]>
1 parent 4102bd2 commit f578282

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

test/e2e/actors.http.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CommunicationProtocolEnum, DaprClient, DaprServer, Temporal } from '../../src';
1+
import { CommunicationProtocolEnum, DaprClient, DaprServer } from '../../src';
22

33
import DemoActorActivateImpl from '../actor/DemoActorActivateImpl';
44
import DemoActorCounterImpl from '../actor/DemoActorCounterImpl';

test/e2e/main.grpc.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const daprAppId = 'test-suite';
99
describe('grpc/main', () => {
1010
let server: DaprServer;
1111
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'));
1414

1515
// We need to start listening on some endpoints already
1616
// this because Dapr is not dynamic and registers endpoints on boot
@@ -34,7 +34,7 @@ describe('grpc/main', () => {
3434

3535
describe('metadata', () => {
3636
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();
3838

3939
// app id is not set in grpc?
4040
// expect(res.id.length).toBeGreaterThan(0);
@@ -66,7 +66,7 @@ describe('grpc/main', () => {
6666
await client.binding.send('binding-mqtt', 'create', { hello: 'world' });
6767

6868
// 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));
7070
expect(mockBindingReceive.mock.calls.length).toBe(1);
7171

7272
// Also test for receiving data
@@ -80,7 +80,7 @@ describe('grpc/main', () => {
8080
await client.pubsub.publish('pubsub-redis', 'test-topic', { hello: 'world' });
8181

8282
// 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));
8484

8585
expect(mockPubSubSubscribe.mock.calls.length).toBe(1);
8686

@@ -97,7 +97,7 @@ describe('grpc/main', () => {
9797

9898
describe('invoker', () => {
9999
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' }));
101101

102102
await server.invoker.listen('hello-world', mock, { method: HttpMethod.GET });
103103
const res = await client.invoker.invoke(daprAppId, 'hello-world', HttpMethod.GET);
@@ -110,7 +110,7 @@ describe('grpc/main', () => {
110110
});
111111

112112
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' }));
114114

115115
await server.invoker.listen('hello-world', mock, { method: HttpMethod.POST });
116116
const res = await client.invoker.invoke(daprAppId, 'hello-world', HttpMethod.POST, {

test/e2e/main.http.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const daprAppId = 'test-suite';
99
describe('http/main', () => {
1010
let server: DaprServer;
1111
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'));
1414

1515
// We need to start listening on some endpoints already
1616
// this because Dapr is not dynamic and registers endpoints on boot
@@ -68,7 +68,7 @@ describe('http/main', () => {
6868
await client.binding.send('binding-mqtt', 'create', { hello: 'world' });
6969

7070
// Delay a bit for event to arrive
71-
await new Promise((resolve, reject) => setTimeout(resolve, 250));
71+
await new Promise((resolve, _reject) => setTimeout(resolve, 250));
7272
expect(mockBindingReceive.mock.calls.length).toBe(1);
7373

7474
// Also test for receiving data
@@ -82,7 +82,7 @@ describe('http/main', () => {
8282
await client.pubsub.publish('pubsub-redis', 'test-topic', { hello: 'world' });
8383

8484
// Delay a bit for event to arrive
85-
await new Promise((resolve, reject) => setTimeout(resolve, 250));
85+
await new Promise((resolve, _reject) => setTimeout(resolve, 250));
8686

8787
expect(mockPubSubSubscribe.mock.calls.length).toBe(1);
8888

@@ -99,7 +99,7 @@ describe('http/main', () => {
9999

100100
describe('invoker', () => {
101101
it('should be able to listen and invoke a service with GET', async () => {
102-
const mock = jest.fn(async (data: object) => ({ hello: 'world' }));
102+
const mock = jest.fn(async (_data: object) => ({ hello: 'world' }));
103103

104104
await server.invoker.listen('hello-world', mock, { method: HttpMethod.GET });
105105
const res = await client.invoker.invoke(daprAppId, 'hello-world', HttpMethod.GET);
@@ -112,7 +112,7 @@ describe('http/main', () => {
112112
});
113113

114114
it('should be able to listen and invoke a service with POST data', async () => {
115-
const mock = jest.fn(async (data: object) => ({ hello: 'world' }));
115+
const mock = jest.fn(async (_data: object) => ({ hello: 'world' }));
116116

117117
await server.invoker.listen('hello-world', mock, { method: HttpMethod.POST });
118118
const res = await client.invoker.invoke(daprAppId, 'hello-world', HttpMethod.POST, {

0 commit comments

Comments
 (0)