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 authored and nallikaea committed Oct 5, 2023
1 parent 65e37fa commit 0811b7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/specs/dashboard-samples/Documentation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { OAUTH_CONSTANTS } from '../../constants/OAUTH_CONSTANTS';
import { Logger } from '../../utils/Logger';

// suit works for DevSpaces
suite.only('Check links to documentation page in Dashboard', function (): void {
suite('Check links to documentation page in Dashboard', function (): void {
this.timeout(180000);
const pathToSampleFile: string = path.resolve('resources/default-devfile.yaml');
const workspaceName: string = YAML.parse(fs.readFileSync(pathToSampleFile, 'utf8')).metadata.name;
Expand Down
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 0811b7e

Please sign in to comment.