Skip to content

Commit

Permalink
Merge pull request #542 from santoshshinde2012/dev
Browse files Browse the repository at this point in the history
Fixed useless constructor exceptions
  • Loading branch information
santoshshinde2012 authored Jan 7, 2024
2 parents 0759f02 + aadf7b0 commit 6e6eb33
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 80 deletions.
93 changes: 45 additions & 48 deletions coverage/lcov.info
Original file line number Diff line number Diff line change
Expand Up @@ -114,64 +114,61 @@ end_of_record
TN:
SF:src/components/system-status/system-status.controller.ts
FN:21,(anonymous_7)
FN:28,(anonymous_8)
FN:43,(anonymous_9)
FN:74,(anonymous_10)
FN:92,(anonymous_11)
FN:119,(anonymous_12)
FN:153,(anonymous_13)
FNF:7
FNH:7
FNDA:4,(anonymous_7)
FNDA:3,(anonymous_8)
FNDA:4,(anonymous_9)
FNDA:2,(anonymous_10)
FN:36,(anonymous_8)
FN:67,(anonymous_9)
FN:85,(anonymous_10)
FN:112,(anonymous_11)
FN:146,(anonymous_12)
FNF:6
FNH:6
FNDA:3,(anonymous_7)
FNDA:4,(anonymous_8)
FNDA:2,(anonymous_9)
FNDA:3,(anonymous_10)
FNDA:3,(anonymous_11)
FNDA:3,(anonymous_12)
FNDA:3,(anonymous_13)
DA:2,4
DA:3,4
DA:4,4
DA:5,4
DA:6,4
DA:17,4
DA:22,4
DA:29,3
DA:30,3
DA:31,3
DA:32,3
DA:33,3
DA:34,3
DA:48,4
DA:49,4
DA:60,4
DA:62,4
DA:64,3
DA:22,3
DA:23,3
DA:24,3
DA:25,3
DA:26,3
DA:27,3
DA:41,4
DA:42,4
DA:53,4
DA:55,4
DA:57,3
DA:68,2
DA:69,2
DA:75,2
DA:76,2
DA:82,2
DA:97,3
DA:98,3
DA:90,3
DA:91,3
DA:92,3
DA:95,3
DA:99,3
DA:102,3
DA:106,3
DA:107,3
DA:109,2
DA:124,3
DA:125,3
DA:126,3
DA:127,3
DA:129,3
DA:140,3
DA:141,3
DA:143,2
DA:158,3
DA:159,3
DA:168,3
DA:169,3
DA:171,2
LF:41
LH:41
DA:100,3
DA:102,2
DA:117,3
DA:118,3
DA:119,3
DA:120,3
DA:122,3
DA:133,3
DA:134,3
DA:136,2
DA:151,3
DA:152,3
DA:161,3
DA:162,3
DA:164,2
LF:40
LH:40
BRF:0
BRH:0
end_of_record
Expand Down
2 changes: 1 addition & 1 deletion src/components/BaseApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Crypto from '../lib/crypto';
export default abstract class BaseApi {
protected router: Router;

protected constructor() {
constructor() {
this.router = Router();
}

Expand Down
7 changes: 0 additions & 7 deletions src/components/system-status/system-status.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ import {
* Status controller
*/
export default class SystemStatusController extends BaseApi {
/**
*
*/
constructor() {
super();
}

/**
*
*/
Expand Down
48 changes: 24 additions & 24 deletions test-report.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/dummy.spec.ts">
<testCase name="Dummy Test Cases Verify Jest is working" duration="4"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="5"/>
<testCase name="Dummy Test Cases Verify Jest is working" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/crypto.spec.ts">
<testCase name="Crypto Lib (Encryption/Decryption) Testing for text" duration="12"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for array" duration="7"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for text" duration="5"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for array" duration="2"/>
<testCase name="Crypto Lib (Encryption/Decryption) Testing for object" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/components/SystemStatusController.spec.ts">
<testCase name="System Status Controller test getError method" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method" duration="3"/>
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="3"/>
<testCase name="System Status Controller test getSystemInfo method with exception" duration="0"/>
<testCase name="System Status Controller test getServerTime method" duration="2"/>
<testCase name="System Status Controller test getServerTime method with exception" duration="0"/>
<testCase name="System Status Controller test getResourceUsage method" duration="0"/>
<testCase name="System Status Controller test getResourceUsage method with exception" duration="0"/>
<testCase name="System Status Controller test getProcessInfo method" duration="0"/>
<testCase name="System Status Controller test getProcessInfo method with exception" duration="0"/>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/lib/logger.spec.ts">
<testCase name="Logger Lib should create a new log directory if one doesn&apos;t already exist" duration="8"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/middleware/error-handler.spec.ts">
<testCase name="ErrorHandler middleware with 0 status code" duration="3"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
<testCase name="ErrorHandler middleware with 0 status code" duration="4"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="1"/>
<testCase name="ErrorHandler middleware with 200 status code and updated env variables" duration="1"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/integration-tests/app.integration.spec.ts">
<testCase name="status integration tests can get default route success" duration="17"/>
<testCase name="status integration tests can get default route success" duration="16"/>
<testCase name="status integration tests can get default web route success" duration="2"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/unit-tests/components/SystemStatusController.spec.ts">
<testCase name="System Status Controller test getError method" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method with updated env variables" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method with exception" duration="0"/>
<testCase name="System Status Controller test getServerTime method" duration="1"/>
<testCase name="System Status Controller test getServerTime method with exception" duration="0"/>
<testCase name="System Status Controller test getResourceUsage method" duration="1"/>
<testCase name="System Status Controller test getResourceUsage method with exception" duration="0"/>
<testCase name="System Status Controller test getProcessInfo method" duration="0"/>
<testCase name="System Status Controller test getProcessInfo method with exception" duration="0"/>
</file>
<file path="/Users/santosh/Documents/workspace/personal/node-boilerplate/tests/integration-tests/status.integration.spec.ts">
<testCase name="status integration tests can get server time" duration="15"/>
<testCase name="status integration tests can get server system info" duration="5"/>
<testCase name="status integration tests can get server time" duration="14"/>
<testCase name="status integration tests can get server system info" duration="4"/>
<testCase name="status integration tests can get server system usage" duration="2"/>
<testCase name="status integration tests can get server system process info" duration="1"/>
<testCase name="status integration tests should get the error" duration="3"/>
<testCase name="status integration tests can get server system process info" duration="2"/>
<testCase name="status integration tests should get the error" duration="4"/>
</file>
</testExecutions>

0 comments on commit 6e6eb33

Please sign in to comment.