Skip to content

Commit 4102bd2

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

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

examples/configuration/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { DaprClient, CommunicationProtocolEnum } from "dapr-client";
1+
import { DaprClient } from "dapr-client";
22

33
const daprHost = "127.0.0.1";
4-
const daprAppId = "example-config";
4+
const daprPortDefault = "30000";
55

66
async function start() {
77

88
const client = new DaprClient(
99
daprHost,
10-
process.env.DAPR_HTTP_PORT
10+
process.env.DAPR_HTTP_PORT ?? daprPortDefault
1111
);
1212

1313
const config = await client.configuration.get('config-store', ['key1', 'key2']);

examples/grpc/hello-world/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DaprServer, DaprClient, HttpMethod, CommunicationProtocolEnum } from "d
22

33
const daprHost = "127.0.0.1";
44
const daprPort = "50050"; // Dapr Sidecar Port of this Example Server
5-
const daprPortActor = "10002"; // Dapr Sidecar Port of the Actor Server
5+
// const daprPortActor = "10002"; // Dapr Sidecar Port of the Actor Server
66
const serverHost = "127.0.0.1"; // App Host of this Example Server
77
const serverPort = "50051"; // App Port of this Example Server
88
const daprAppId = "example-hello-world";

test/unit/actor/actor.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,13 @@ describe('Actor', () => {
1414
const runtime = ActorRuntime.getInstanceByDaprClient(client);
1515

1616
// Reset the runtime config
17-
const config = runtime.getActorRuntimeConfig();
18-
const newConfig = new ActorRuntimeConfig(
17+
const config = new ActorRuntimeConfig(
1918
Temporal.Duration.from({ hours: 1 })
2019
, Temporal.Duration.from({ seconds: 30 })
2120
, Temporal.Duration.from({ minutes: 1 })
2221
, true
2322
);
24-
runtime.setActorRuntimeConfig(newConfig);
23+
runtime.setActorRuntimeConfig(config);
2524

2625
// Clear the Actor Managers
2726
runtime.clearActorManagers();

test/unit/actor/actorRuntime.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ describe('ActorRuntime', () => {
1919
runtime = ActorRuntime.getInstanceByDaprClient(client);
2020

2121
// Reset the runtime config
22-
const config = runtime.getActorRuntimeConfig();
23-
const newConfig = new ActorRuntimeConfig(
22+
const config = new ActorRuntimeConfig(
2423
Temporal.Duration.from({ hours: 1 })
2524
, Temporal.Duration.from({ seconds: 30 })
2625
, Temporal.Duration.from({ minutes: 1 })
2726
, true
2827
);
29-
runtime.setActorRuntimeConfig(newConfig);
28+
runtime.setActorRuntimeConfig(config);
3029

3130
// Clear the Actor Managers
3231
runtime.clearActorManagers();
@@ -115,10 +114,10 @@ describe('ActorRuntime', () => {
115114
});
116115

117116
it('should be able to fire a reminder', async () => {
118-
const actorId = new ActorId(uuidv4());
117+
new ActorId(uuidv4());
119118
});
120119

121120
it('should be able to fire a timer', async () => {
122-
const actorId = new ActorId(uuidv4());
121+
new ActorId(uuidv4());
123122
});
124123
})

test/unit/main/DaprClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('DaprClient', () => {
1212

1313
it('should throw an error on a wrong port', () => {
1414
try {
15-
const client = new DaprClient(host, host);
15+
new DaprClient(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
1818
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");

test/unit/main/DaprServer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('DaprServer', () => {
1212

1313
it('should throw an error on a wrong port for server', () => {
1414
try {
15-
const server = new DaprServer(host, host);
15+
new DaprServer(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
1818
expect(msg).toEqual("DAPR_INCORRECT_SERVER_PORT");
@@ -21,7 +21,7 @@ describe('DaprServer', () => {
2121

2222
it('should throw an error on a wrong port for client', () => {
2323
try {
24-
const server = new DaprServer(host, port, host, host);
24+
new DaprServer(host, port, host, host);
2525
} catch (e) {
2626
const msg = (e as Error).message;
2727
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");

0 commit comments

Comments
 (0)