Skip to content

Commit f052c0b

Browse files
committed
More
1 parent 41e9a3b commit f052c0b

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/actions/find/src/findForUrl.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
import type { Finding } from './types.d.js';
2-
import AxeBuilder from '@axe-core/playwright'
3-
import playwright from 'playwright';
4-
import { AuthContext } from './AuthContext.js';
1+
import type { Finding } from "./types.d.js";
2+
import AxeBuilder from "@axe-core/playwright";
3+
import playwright from "playwright";
4+
import { AuthContext } from "./AuthContext.js";
55

6-
export async function findForUrl(url: string, authContext?: AuthContext): Promise<Finding[]> {
7-
const browser = await playwright.chromium.launch({ headless: true, executablePath: process.env.CI ? '/usr/bin/google-chrome' : undefined });
6+
export async function findForUrl(
7+
url: string,
8+
authContext?: AuthContext,
9+
): Promise<Finding[]> {
10+
const browser = await playwright.chromium.launch({
11+
headless: true,
12+
executablePath: process.env.CI ? "/usr/bin/google-chrome" : undefined,
13+
});
814
const contextOptions = authContext?.toPlaywrightBrowserContextOptions() ?? {};
915
const context = await browser.newContext(contextOptions);
1016
const page = await context.newPage();

.github/actions/find/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default async function () {
88
const urls = core.getMultilineInput("urls", { required: true });
99
core.debug(`Input: 'urls: ${JSON.stringify(urls)}'`);
1010
const authContextInput: AuthContextInput = JSON.parse(
11-
core.getInput("auth_context", { required: false }) || "{}"
11+
core.getInput("auth_context", { required: false }) || "{}",
1212
);
1313
const authContext = new AuthContext(authContextInput);
1414

0 commit comments

Comments
 (0)