Skip to content

Commit f042d5b

Browse files
Fix unit tests
Signed-off-by: Xavier Geerinck <[email protected]>
1 parent ce8d8cf commit f042d5b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/implementation/Client/DaprClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default class DaprClient {
5858

5959
// Validation on port
6060
if (!/^[0-9]+$/.test(this.daprPort)) {
61-
throw new Error('DAPR_CLIENT_INCORRECT_PORT');
61+
throw new Error('DAPR_INCORRECT_SIDECAR_PORT');
6262
}
6363

6464
// Builder

src/implementation/Server/DaprServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ export default class DaprServer {
5858

5959
// Validation on port
6060
if (!/^[0-9]+$/.test(this.serverPort)) {
61-
throw new Error('DAPR_SERVER_INCORRECT_SERVER_PORT');
61+
throw new Error('DAPR_INCORRECT_SERVER_PORT');
6262
}
6363

6464
if (!/^[0-9]+$/.test(this.daprPort)) {
65-
throw new Error('DAPR_SERVER_INCORRECT_SIDECAR_PORT');
65+
throw new Error('DAPR_INCORRECT_SIDECAR_PORT');
6666
}
6767

6868
// Builder

test/unit/main/DaprClient.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('DaprClient', () => {
1515
const client = new DaprClient(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
18-
expect(msg).toEqual("DAPR_CLIENT_INCORRECT_PORT");
18+
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");
1919
}
2020
});
2121
});

test/unit/main/DaprServer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('DaprServer', () => {
1515
const server = new DaprServer(host, host);
1616
} catch (e) {
1717
const msg = (e as Error).message;
18-
expect(msg).toEqual("DAPR_SERVER_INCORRECT_SERVER_PORT");
18+
expect(msg).toEqual("DAPR_INCORRECT_SERVER_PORT");
1919
}
2020
});
2121

@@ -24,7 +24,7 @@ describe('DaprServer', () => {
2424
const server = new DaprServer(host, port, host, host);
2525
} catch (e) {
2626
const msg = (e as Error).message;
27-
expect(msg).toEqual("DAPR_SERVER_INCORRECT_SIDECAR_PORT");
27+
expect(msg).toEqual("DAPR_INCORRECT_SIDECAR_PORT");
2828
}
2929
});
3030
});

0 commit comments

Comments
 (0)