Skip to content

Commit

Permalink
Run prettier v3
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed Jul 26, 2023
1 parent f88aab0 commit 996f971
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/connect-to-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const connectToCachedBrowser = async (
return puppeteer
.connect({ browserWSEndpoint: cachedWSEndpoint })
.catch(
() => ({ connected: false, previousValue: cachedWSEndpoint } as const),
() => ({ connected: false, previousValue: cachedWSEndpoint }) as const,
);
}

Expand Down
9 changes: 6 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ export const withBrowser: WithBrowser = (...args: any[]) => {
);
}

await ctx.page.evaluate((...colorErr) => {
console.log(...colorErr);
}, ...(ansiColorsLog(...failureMessage) as any));
await ctx.page.evaluate(
(...colorErr) => {
console.log(...colorErr);
},
...(ansiColorsLog(...failureMessage) as any),
);
}

await cleanup(true);
Expand Down
21 changes: 12 additions & 9 deletions src/user-util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,18 @@ export const error = (
literals: TemplateStringsArray,
...placeholders: (InterpolableIntoError | InterpolableIntoError[])[]
) => ({
error: literals.reduce((acc, val, i) => {
if (i !== 0) {
const item = placeholders[i - 1];
if (Array.isArray(item)) acc.push(...item);
else acc.push(item);
}
if (val !== '') acc.push(val);
return acc;
}, [] as (string | Element | number | boolean)[]),
error: literals.reduce(
(acc, val, i) => {
if (i !== 0) {
const item = placeholders[i - 1];
if (Array.isArray(item)) acc.push(...item);
else acc.push(item);
}
if (val !== '') acc.push(val);
return acc;
},
[] as (string | Element | number | boolean)[],
),
});

const capitalizeText = (text: string) => text[0].toUpperCase() + text.slice(1);

0 comments on commit 996f971

Please sign in to comment.