Skip to content

Commit

Permalink
chore(options): fix default runner checking
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Sep 27, 2023
1 parent 37ed49f commit 6aa262a
Show file tree
Hide file tree
Showing 6 changed files with 1,283 additions and 1,514 deletions.
2 changes: 1 addition & 1 deletion kayle/lib/kayle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const kayle = async (
auditPage(config),
]);

clearTimeout(watcher.timer);
clearTimeout(watcher.timer as number);

if (results && o.clip && Array.isArray(results.issues)) {
results.issues = await Promise.all(
Expand Down
3 changes: 2 additions & 1 deletion kayle/lib/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ export function extractArgs(o, watcher?: Watcher) {
options.ignore.push("warning");
}
}

// default to a runner
if (
!options.runners.some((runner) => runner === "axe" || runner === "htmlcs")
!options.runners.some((runner) => runner === "axe" || runner === "htmlcs" || runner === "ace")
) {
options.runners.push("htmlcs");
}
Expand Down
2 changes: 1 addition & 1 deletion kayle/lib/utils/cdp-blocking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const sendCDPPageConfigurationEnable = async (
// clear test - script may contain infinite re-navigation if cleared and executed
// we should instead track the url and set to block the transition.
if (o._watcher && o._watcher.timer) {
return clearTimeout(o._watcher.timer);
return clearTimeout(o._watcher.timer as number);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion kayle/lib/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Audit } from "./common";

// watcher cycle timeout
declare class Watcher {
timer: null | NodeJS.Timer;
timer: null | NodeJS.Timer | number;
watch?(timer: number): Promise<Audit>;
}

Expand Down
10 changes: 8 additions & 2 deletions kayle/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "kayle",
"version": "0.7.6",
"version": "0.7.7",
"description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.",
"main": "./build/index.js",
"keywords": [
"accessibility"
"accessibility",
"web-accessibility",
"a11ywatch",
"web-accessibility-automation",
"axe",
"htmlcs",
"ace"
],
"author": "Jeff Mendez",
"contributors": [
Expand Down
Loading

0 comments on commit 6aa262a

Please sign in to comment.