Skip to content

Commit

Permalink
fix: eslint issues
Browse files Browse the repository at this point in the history
Signed-off-by: mdolhalo <[email protected]>
  • Loading branch information
mdolhalo committed Oct 5, 2023
1 parent a32712e commit 2565622
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/e2e/utils/CheReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*
* SPDX-License-Identifier: EPL-2.0
**********************************************************************/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import * as chromeHar from 'chrome-har';
import * as mocha from 'mocha';
import { CLASSES } from '../configs/inversify.types';
import * as fs from 'fs';
Expand All @@ -26,8 +29,6 @@ import { PLUGIN_TEST_CONSTANTS } from '../constants/PLUGIN_TEST_CONSTANTS';
import { injectable } from 'inversify';
import getDecorators from 'inversify-inject-decorators';
import { e2eContainer } from '../configs/inversify.config';
// @ts-ignore: No module declaration file
import * as chromeHar from 'chrome-har';

const { lazyInject } = getDecorators(e2eContainer);

Expand Down Expand Up @@ -67,7 +68,7 @@ class CheReporter extends mocha.reporters.Spec {
TS_SAMPLE_LIST: ${PLUGIN_TEST_CONSTANTS.TS_SAMPLE_LIST}
${process.env.MOCHA_DIRECTORY ? 'MOCHA_DIRECTORY: ' + process.env.MOCHA_DIRECTORY : 'MOCHA_DRIRECTORY is not set'}
${process.env.MOCHA_DIRECTORY ? 'MOCHA_DIRECTORY: ' + process.env.MOCHA_DIRECTORY : 'MOCHA_DIRECTORY is not set'}
${process.env.USERSTORY ? 'USERSTORY: ' + process.env.USERSTORY : 'USERSTORY is not set'}
`;

Expand Down Expand Up @@ -178,8 +179,8 @@ class CheReporter extends mocha.reporters.Spec {

// take networking logs and write to file
const networkLogsEntries: logging.Entry[] = await this.driverHelper.getDriver().manage().logs().get('performance');
const events = networkLogsEntries.map((entry) => JSON.parse(entry.message).message);
const har = chromeHar.harFromMessages(events, { includeTextFromResponseBody: true });
const events: any[] = networkLogsEntries.map((entry): any[] => JSON.parse(entry.message).message);
const har: any = chromeHar.harFromMessages(events, { includeTextFromResponseBody: true });
const networkLogsStream: WriteStream = fs.createWriteStream(harFileName);
networkLogsStream.write(Buffer.from(JSON.stringify(har)), (): void => {
networkLogsStream.end();
Expand Down

0 comments on commit 2565622

Please sign in to comment.