Skip to content

Commit 6e6eb33

Browse files
Merge pull request #542 from santoshshinde2012/dev
Fixed useless constructor exceptions
2 parents 0759f02 + aadf7b0 commit 6e6eb33

File tree

4 files changed

+70
-80
lines changed

4 files changed

+70
-80
lines changed

coverage/lcov.info

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -114,64 +114,61 @@ end_of_record
114114
TN:
115115
SF:src/components/system-status/system-status.controller.ts
116116
FN:21,(anonymous_7)
117-
FN:28,(anonymous_8)
118-
FN:43,(anonymous_9)
119-
FN:74,(anonymous_10)
120-
FN:92,(anonymous_11)
121-
FN:119,(anonymous_12)
122-
FN:153,(anonymous_13)
123-
FNF:7
124-
FNH:7
125-
FNDA:4,(anonymous_7)
126-
FNDA:3,(anonymous_8)
127-
FNDA:4,(anonymous_9)
128-
FNDA:2,(anonymous_10)
117+
FN:36,(anonymous_8)
118+
FN:67,(anonymous_9)
119+
FN:85,(anonymous_10)
120+
FN:112,(anonymous_11)
121+
FN:146,(anonymous_12)
122+
FNF:6
123+
FNH:6
124+
FNDA:3,(anonymous_7)
125+
FNDA:4,(anonymous_8)
126+
FNDA:2,(anonymous_9)
127+
FNDA:3,(anonymous_10)
129128
FNDA:3,(anonymous_11)
130129
FNDA:3,(anonymous_12)
131-
FNDA:3,(anonymous_13)
132130
DA:2,4
133131
DA:3,4
134132
DA:4,4
135133
DA:5,4
136134
DA:6,4
137135
DA:17,4
138-
DA:22,4
139-
DA:29,3
140-
DA:30,3
141-
DA:31,3
142-
DA:32,3
143-
DA:33,3
144-
DA:34,3
145-
DA:48,4
146-
DA:49,4
147-
DA:60,4
148-
DA:62,4
149-
DA:64,3
136+
DA:22,3
137+
DA:23,3
138+
DA:24,3
139+
DA:25,3
140+
DA:26,3
141+
DA:27,3
142+
DA:41,4
143+
DA:42,4
144+
DA:53,4
145+
DA:55,4
146+
DA:57,3
147+
DA:68,2
148+
DA:69,2
150149
DA:75,2
151-
DA:76,2
152-
DA:82,2
153-
DA:97,3
154-
DA:98,3
150+
DA:90,3
151+
DA:91,3
152+
DA:92,3
153+
DA:95,3
155154
DA:99,3
156-
DA:102,3
157-
DA:106,3
158-
DA:107,3
159-
DA:109,2
160-
DA:124,3
161-
DA:125,3
162-
DA:126,3
163-
DA:127,3
164-
DA:129,3
165-
DA:140,3
166-
DA:141,3
167-
DA:143,2
168-
DA:158,3
169-
DA:159,3
170-
DA:168,3
171-
DA:169,3
172-
DA:171,2
173-
LF:41
174-
LH:41
155+
DA:100,3
156+
DA:102,2
157+
DA:117,3
158+
DA:118,3
159+
DA:119,3
160+
DA:120,3
161+
DA:122,3
162+
DA:133,3
163+
DA:134,3
164+
DA:136,2
165+
DA:151,3
166+
DA:152,3
167+
DA:161,3
168+
DA:162,3
169+
DA:164,2
170+
LF:40
171+
LH:40
175172
BRF:0
176173
BRH:0
177174
end_of_record

src/components/BaseApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Crypto from '../lib/crypto';
88
export default abstract class BaseApi {
99
protected router: Router;
1010

11-
protected constructor() {
11+
constructor() {
1212
this.router = Router();
1313
}
1414

src/components/system-status/system-status.controller.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ import {
1515
* Status controller
1616
*/
1717
export default class SystemStatusController extends BaseApi {
18-
/**
19-
*
20-
*/
21-
constructor() {
22-
super();
23-
}
24-
2518
/**
2619
*
2720
*/

test-report.xml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<testExecutions version="1">
33
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/dummy.spec.ts">
4-
<testCase name="Dummy Test Cases Verify Jest is working" duration="4"/>
5-
</file>
6-
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
7-
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="5"/>
4+
<testCase name="Dummy Test Cases Verify Jest is working" duration="2"/>
85
</file>
96
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/crypto.spec.ts">
10-
<testCase name="Crypto Lib (Encryption/Decryption) Testing for text" duration="12"/>
11-
<testCase name="Crypto Lib (Encryption/Decryption) Testing for array" duration="7"/>
7+
<testCase name="Crypto Lib (Encryption/Decryption) Testing for text" duration="5"/>
8+
<testCase name="Crypto Lib (Encryption/Decryption) Testing for array" duration="2"/>
129
<testCase name="Crypto Lib (Encryption/Decryption) Testing for object" duration="2"/>
1310
</file>
14-
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/components/SystemStatusController.spec.ts">
15-
<testCase name="System Status Controller test getError method" duration="2"/>
16-
<testCase name="System Status Controller test getSystemInfo method" duration="3"/>
17-
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="3"/>
18-
<testCase name="System Status Controller test getSystemInfo method with exception" duration="0"/>
19-
<testCase name="System Status Controller test getServerTime method" duration="2"/>
20-
<testCase name="System Status Controller test getServerTime method with exception" duration="0"/>
21-
<testCase name="System Status Controller test getResourceUsage method" duration="0"/>
22-
<testCase name="System Status Controller test getResourceUsage method with exception" duration="0"/>
23-
<testCase name="System Status Controller test getProcessInfo method" duration="0"/>
24-
<testCase name="System Status Controller test getProcessInfo method with exception" duration="0"/>
11+
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
12+
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="8"/>
2513
</file>
2614
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/middleware/error-handler.spec.ts">
27-
<testCase name="ErrorHandler middleware with 0 status code" duration="3"/>
28-
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
15+
<testCase name="ErrorHandler middleware with 0 status code" duration="4"/>
2916
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
17+
<testCase name="ErrorHandler middleware with 200 status code" duration="1"/>
3018
<testCase name="ErrorHandler middleware with 200 status code and updated env variables" duration="1"/>
3119
</file>
3220
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/integration-tests/app.integration.spec.ts">
33-
<testCase name="status integration tests can get default route success" duration="17"/>
21+
<testCase name="status integration tests can get default route success" duration="16"/>
3422
<testCase name="status integration tests can get default web route success" duration="2"/>
3523
</file>
24+
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/components/SystemStatusController.spec.ts">
25+
<testCase name="System Status Controller test getError method" duration="2"/>
26+
<testCase name="System Status Controller test getSystemInfo method" duration="2"/>
27+
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="2"/>
28+
<testCase name="System Status Controller test getSystemInfo method with exception" duration="0"/>
29+
<testCase name="System Status Controller test getServerTime method" duration="1"/>
30+
<testCase name="System Status Controller test getServerTime method with exception" duration="0"/>
31+
<testCase name="System Status Controller test getResourceUsage method" duration="1"/>
32+
<testCase name="System Status Controller test getResourceUsage method with exception" duration="0"/>
33+
<testCase name="System Status Controller test getProcessInfo method" duration="0"/>
34+
<testCase name="System Status Controller test getProcessInfo method with exception" duration="0"/>
35+
</file>
3636
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/integration-tests/status.integration.spec.ts">
37-
<testCase name="status integration tests can get server time" duration="15"/>
38-
<testCase name="status integration tests can get server system info" duration="5"/>
37+
<testCase name="status integration tests can get server time" duration="14"/>
38+
<testCase name="status integration tests can get server system info" duration="4"/>
3939
<testCase name="status integration tests can get server system usage" duration="2"/>
40-
<testCase name="status integration tests can get server system process info" duration="1"/>
41-
<testCase name="status integration tests should get the error" duration="3"/>
40+
<testCase name="status integration tests can get server system process info" duration="2"/>
41+
<testCase name="status integration tests should get the error" duration="4"/>
4242
</file>
4343
</testExecutions>

0 commit comments

Comments
 (0)