Skip to content

Commit

Permalink
fixed build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshshinde2012 committed Mar 8, 2024
1 parent b326811 commit d49e932
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 40 deletions.
8 changes: 4 additions & 4 deletions coverage/lcov.info
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ DA:85,1
DA:89,2
DA:93,1
DA:94,1
DA:95,1
DA:96,1
DA:98,0
DA:95,0
DA:96,0
DA:98,1
DA:103,1
DA:115,0
DA:116,0
DA:117,0
DA:119,0
DA:120,0
LF:42
LH:36
LH:35
BRDA:36,0,0,1
BRF:1
BRH:1
Expand Down
15 changes: 0 additions & 15 deletions src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default class App {
this.parseRequestHeader,
this.basePathRoute,
);
this.express.get('/logout', this.logout);
}

/**
Expand Down Expand Up @@ -106,18 +105,4 @@ export default class App {
swaggerUi.setup(swaggerDocument),
);
}

private logout(
request: Request,
response: Response,
_next: NextFunction,
): void {
try {
request.logout((error) => logger.error(error));
response.redirect('/login/github');
} catch (error) {
logger.error('Error during logout:', error);
response.status(500).send('Error during logout');
}
}
}
42 changes: 21 additions & 21 deletions test-report.xml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/unit-tests/components/system-status/SystemStatusController.spec.ts">
<testCase name="System Status Controller test getError method" duration="3"/>
<testCase name="System Status Controller test getSystemInfo method" duration="3"/>
<testCase name="System Status Controller test getServerTime method" duration="3"/>
<testCase name="System Status Controller test getResourceUsage method" duration="1"/>
<testCase name="System Status Controller test getProcessInfo method" duration="1"/>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/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="7"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/unit-tests/middleware/error-handler.spec.ts">
<testCase name="ErrorHandler middleware with 0 status code" duration="5"/>
<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="1"/>
<testCase name="ErrorHandler middleware with 200 status code" duration="0"/>
<testCase name="ErrorHandler middleware with 200 status code and updated env variables" duration="1"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/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="9"/>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/unit-tests/components/system-status/SystemStatusController.spec.ts">
<testCase name="System Status Controller test getError method" duration="2"/>
<testCase name="System Status Controller test getSystemInfo method" duration="5"/>
<testCase name="System Status Controller test getServerTime method" duration="1"/>
<testCase name="System Status Controller test getResourceUsage method" duration="1"/>
<testCase name="System Status Controller test getProcessInfo method" duration="0"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/unit-tests/components/enquiry/EnquiryController.spec.ts">
<testCase name="Enquiry Controller should register routes and return router" duration="3"/>
<testCase name="Enquiry Controller should register routes and return router" duration="2"/>
<testCase name="Enquiry Controller should get all enquiries" duration="0"/>
<testCase name="Enquiry Controller should handle errors to get all enquiries" duration="1"/>
<testCase name="Enquiry Controller should get details of a specific enquiry" duration="1"/>
<testCase name="Enquiry Controller should handle errors to get all enquiries" duration="0"/>
<testCase name="Enquiry Controller should get details of a specific enquiry" duration="0"/>
<testCase name="Enquiry Controller should handle errors to get all enquiries" duration="1"/>
<testCase name="Enquiry Controller should create enquiry" duration="0"/>
<testCase name="Enquiry Controller should throw BAD_REQUEST error if name and country are not provided" duration="1"/>
<testCase name="Enquiry Controller should handle errors in create enquiry" duration="0"/>
<testCase name="Enquiry Controller should throw BAD_REQUEST error if name and country are not provided" duration="0"/>
<testCase name="Enquiry Controller should handle errors in create enquiry" duration="1"/>
<testCase name="Enquiry Controller should update enquiry" duration="0"/>
<testCase name="Enquiry Controller should handle errors in update enquiry" duration="1"/>
<testCase name="Enquiry Controller should delete enquiry" duration="0"/>
<testCase name="Enquiry Controller should handle errors in delete enquiry" duration="0"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/unit-tests/components/enquiry/EnquiryService.spec.ts">
<testCase name="EnquiryService should return all enquiries" duration="4"/>
<testCase name="EnquiryService should return all enquiries" duration="5"/>
<testCase name="EnquiryService should throw error if failed to fetch enquiries" duration="6"/>
<testCase name="EnquiryService should return particular enquiry by id" duration="0"/>
<testCase name="EnquiryService should throw error if failed to fetch empty enquiry by id" duration="2"/>
Expand All @@ -40,13 +40,13 @@
<testCase name="EnquiryService should throw an error if it fails to update as it failed to find the enquiry by id" duration="1"/>
<testCase name="EnquiryService should throw an error if it fails to update" duration="0"/>
<testCase name="EnquiryService should create a new enquiry with valid input" duration="0"/>
<testCase name="EnquiryService should throw error if failed to create enquiry" duration="1"/>
<testCase name="EnquiryService should return true if enquiry is deleted successfully" duration="2"/>
<testCase name="EnquiryService should return false if no enquiry is deleted" duration="0"/>
<testCase name="EnquiryService should throw error if failed to delete enquiry" duration="1"/>
<testCase name="EnquiryService should throw error if failed to create enquiry" duration="0"/>
<testCase name="EnquiryService should return true if enquiry is deleted successfully" duration="0"/>
<testCase name="EnquiryService should return false if no enquiry is deleted" duration="1"/>
<testCase name="EnquiryService should throw error if failed to delete enquiry" duration="0"/>
</file>
<file path="/Users/santosh/Documents/workspace/boilerplates/nodejs-assessment/tests/integration-tests/app.integration.spec.ts">
<testCase name="status integration tests can get default route success" duration="11"/>
<testCase name="status integration tests can get default route success" duration="13"/>
<testCase name="status integration tests can get default web route success" duration="2"/>
</file>
</testExecutions>

0 comments on commit d49e932

Please sign in to comment.