Skip to content

Commit e7caa79

Browse files
Removed unused variable. Fixed tests naming. Added create-badges script.
1 parent 06ff4be commit e7caa79

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"build": "tsc",
1111
"test": "jest",
1212
"lint": "eslint src --ext .ts,.tsx",
13-
"lint:fix": "eslint src --ext .ts,.tsx --fix"
13+
"lint:fix": "eslint src --ext .ts,.tsx --fix",
14+
"create-badges": "istanbul-badges-readme"
1415
},
1516
"keywords": [
1617
"ocpp",
@@ -66,7 +67,7 @@
6667
"transform": {
6768
"^.+\\.(t|j)s$": "ts-jest"
6869
},
69-
"coverageReporters": ["json-summary"],
70+
"coverageReporters": ["json-summary", "lcov"],
7071
"collectCoverageFrom": [
7172
"**/*.(t|j)s"
7273
],

src/OcppClient.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe(
1414
});
1515

1616
it(
17-
"test callRequest method",
17+
"Test method 'callRequest'. Should run method 'callRequest' correctly ",
1818
async () => {
1919

2020
const boot: BootNotificationRequest = {
@@ -38,7 +38,7 @@ describe(
3838
);
3939

4040
it(
41-
"test on method",
41+
"Test method 'on'. Should run method 'on' correctly",
4242
() => {
4343
jest.spyOn(
4444
ocppCl,
@@ -59,7 +59,7 @@ describe(
5959
);
6060

6161
it(
62-
"test connect method",
62+
"Test method 'connect'. Should run method 'connect' correctly",
6363
() => {
6464
jest.spyOn(
6565
ocppCl,

src/OcppClientConnection.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe(
1818
});
1919

2020
it(
21-
"test getCpId method",
21+
"Test method 'getCpId'. Should run method 'getCpId' correctly",
2222
() => {
2323
const fakeGetCpId = jest.fn().mockReturnValue("testId");
2424
jest.mock(
@@ -36,7 +36,7 @@ describe(
3636
);
3737

3838
it(
39-
"test setConnection method",
39+
"Test method 'setConnection'. Should run method 'setConnection' correctly",
4040
() => {
4141
const spySetConnection = jest.spyOn(
4242
ocppClCon,
@@ -56,7 +56,7 @@ describe(
5656
);
5757

5858
it(
59-
"test callRequest method",
59+
"Test method 'callRequest'. Should run method 'callRequest' correctly",
6060
() => {
6161
ocppClCon.callRequest(
6262
"CancelReservation",
@@ -73,7 +73,7 @@ describe(
7373
);
7474

7575
it(
76-
"test on method",
76+
"Test method 'on'. Should run method 'on' correctly",
7777
() => {
7878
jest.spyOn(
7979
ocppClCon,

src/impl/SchemaValidator.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from "./OcppError";
99

1010
describe(
11-
"OcppSchema",
11+
"Test SchemaValidator's validate method.",
1212
() => {
1313
const customSchema = {
1414
"$schema": "http://json-schema.org/draft-06/schema#",

src/impl/Server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import { OcppClientConnection } from "../OcppClientConnection";
1313
import { Protocol } from "./Protocol";
1414

1515
export class Server extends EventEmitter {
16-
private server: WebSocket.Server | null = null;
17-
1816
private clients: Array<Client> = [];
1917

2018
/* istanbul ignore next */

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
/* istanbul ignore next */
12
export * from "./impl/OcppError";
3+
/* istanbul ignore next */
24
export * from "./OcppServer";
5+
/* istanbul ignore next */
36
export * from "./OcppClient";
7+
/* istanbul ignore next */
48
export * from "./OcppClientConnection";
9+
/* istanbul ignore next */
510
export * from "./types";

0 commit comments

Comments
 (0)