diff --git a/packages/cli/.eslintrc.js b/packages/cli/.eslintrc.js index 2f007dea..48e606a2 100644 --- a/packages/cli/.eslintrc.js +++ b/packages/cli/.eslintrc.js @@ -1,7 +1,7 @@ module.exports = { rules: { '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/ban-ts-ignore': 'off', + '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/explicit-function-return-type': 'off' }, overrides: [ diff --git a/packages/cli/src/bin/cli.ts b/packages/cli/src/bin/cli.ts index c2031e36..5154a182 100644 --- a/packages/cli/src/bin/cli.ts +++ b/packages/cli/src/bin/cli.ts @@ -60,7 +60,9 @@ program ) .option( '--timeout ', - 'Set how much time (seconds) axe has to run (default: 90)' + 'Set how much time (seconds) axe has to run', + // @ts-ignore + 90 ) .option('--timer', 'Log the time it takes to run') .option('--show-errors [boolean]', 'Display the full error stack', true) diff --git a/packages/cli/src/lib/webdriver.test.ts b/packages/cli/src/lib/webdriver.test.ts index 83b1754f..eb941e5c 100644 --- a/packages/cli/src/lib/webdriver.test.ts +++ b/packages/cli/src/lib/webdriver.test.ts @@ -14,6 +14,7 @@ describe('startDriver', () => { beforeEach(() => { browser = 'chrome-headless'; config = { + timeout: 90, get browser() { return browser; } diff --git a/packages/cli/src/lib/webdriver.ts b/packages/cli/src/lib/webdriver.ts index c41c1cba..eeedfe08 100644 --- a/packages/cli/src/lib/webdriver.ts +++ b/packages/cli/src/lib/webdriver.ts @@ -6,7 +6,7 @@ import { WebdriverConfigParams } from '../types'; const startDriver = async ( config: WebdriverConfigParams ): Promise => { - const scriptTimeout = (config.timeout || 20) * 1000.0; + const scriptTimeout = config.timeout * 1000.0; let builder: Builder; /* istanbul ignore else */ if (config.browser === 'chrome-headless') { diff --git a/packages/cli/src/types.ts b/packages/cli/src/types.ts index 4b125f8d..e3bd98e9 100644 --- a/packages/cli/src/types.ts +++ b/packages/cli/src/types.ts @@ -21,7 +21,7 @@ export interface EventResponse { export interface WebdriverConfigParams { browser: string; - timeout?: number; + timeout: number; chromedriverPath?: string; path?: string; chromeOptions?: string[];