The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
style: apply prettier formatting to browser test skip checks
Steven Enamakel203eb6a36945
diff --git a/app/test/playwright/specs/chat-todo-list-render.spec.ts b/app/test/playwright/specs/chat-todo-list-render.spec.tsindex aabf5e1711..35aaf4ae84 100644--- a/app/test/playwright/specs/chat-todo-list-render.spec.ts+++ b/app/test/playwright/specs/chat-todo-list-render.spec.ts@@ -173,9 +173,10 @@ test.describe('Todo list render', () => {// Control: no list of either kind before the agent writes one, so the// assertions below are about something that appeared.- await expect(allTodoSurfaces(page), 'a todo surface was on screen before any write').toHaveCount(- 0- );+ await expect(+ allTodoSurfaces(page),+ 'a todo surface was on screen before any write'+ ).toHaveCount(0);const threadId = await waitForSelectedThreadId(page);const before = (await upstreamBodies()).length;@@ -287,10 +288,10 @@ test.describe('Todo list render', () => {}).toBeGreaterThan(before + 1);- await expect(settledPinnedCard(page), 'the rejected write hid the previous task card').toHaveCount(- 1,- { timeout: 30_000 }- );+ await expect(+ settledPinnedCard(page),+ 'the rejected write hid the previous task card'+ ).toHaveCount(1, { timeout: 30_000 });const states = await itemStates(settledPinnedCard(page).first());expect(await itemTexts(settledPinnedCard(page).first())).toEqual([...STEPS]);expect(states).toEqual(['pending', 'pending', 'pending']);diff --git a/scripts/__tests__/browser-test-skips.test.mjs b/scripts/__tests__/browser-test-skips.test.mjsindex 19b1613975..82b63bb248 100644--- a/scripts/__tests__/browser-test-skips.test.mjs+++ b/scripts/__tests__/browser-test-skips.test.mjs@@ -42,20 +42,20 @@ test("ignores inert text but scans executable template interpolations", () => {]);});-test('ignores regex literals without letting their delimiters hide executable calls', () => {+test("ignores regex literals without letting their delimiters hide executable calls", () => {const source = ['const quote = /"/;',"test.skip('missing after quote regex');",- 'const backtick = /`/;',- 'this.skip();',- 'const fakeCall = /test.skip\\(foo\\)/;',- 'const commentStart = /\\/\\//;',- 'const blockCommentStart = /\\/\\*/;',+ "const backtick = /`/;",+ "this.skip();",+ "const fakeCall = /test.skip\\(foo\\)/;",+ "const commentStart = /\\/\\//;",+ "const blockCommentStart = /\\/\\*/;",`test.skip('tracked'); // ${url}`,- ].join('\n');+ ].join("\n");assert.deepEqual(untrackedSkipLines(source), ["2: test.skip('missing after quote regex');",- '4: this.skip();',+ "4: this.skip();",]);});diff --git a/scripts/ci/check-browser-test-skips.mjs b/scripts/ci/check-browser-test-skips.mjsindex de49083039..b67a1664d1 100644--- a/scripts/ci/check-browser-test-skips.mjs+++ b/scripts/ci/check-browser-test-skips.mjs@@ -1,35 +1,39 @@#!/usr/bin/env node// Every executable browser-test skip needs its tracking issue on the same line.-import { execFileSync } from 'node:child_process';-import { readFileSync } from 'node:fs';-import { createRequire } from 'node:module';+import { execFileSync } from "node:child_process";+import { readFileSync } from "node:fs";+import { createRequire } from "node:module";-const requireFromApp = createRequire(new URL('../../app/package.json', import.meta.url));-const ts = requireFromApp('typescript');+const requireFromApp = createRequire(+ new URL("../../app/package.json", import.meta.url),+);+const ts = requireFromApp("typescript");const issueUrl = /https:\/\/github\.com\/[\w.-]+\/[\w.-]+\/issues\/\d+/;export function untrackedSkipLines(source) {const sourceFile = ts.createSourceFile(- 'browser-spec.tsx',+ "browser-spec.tsx",source,ts.ScriptTarget.Latest,true,- ts.ScriptKind.TSX+ ts.ScriptKind.TSX,);- const lines = source.split('\n');+ const lines = source.split("\n");const failures = [];function visit(node) {if (ts.isCallExpression(node) &&ts.isPropertyAccessExpression(node.expression) &&- node.expression.name.text === 'skip'+ node.expression.name.text === "skip") {- const line = sourceFile.getLineAndCharacterOfPosition(node.expression.name.getStart(sourceFile))- .line + 1;- if (!issueUrl.test(lines[line - 1] ?? '')) {- failures.push(`${line}: ${lines[line - 1]?.trim() ?? ''}`);+ const line =+ sourceFile.getLineAndCharacterOfPosition(+ node.expression.name.getStart(sourceFile),+ ).line + 1;+ if (!issueUrl.test(lines[line - 1] ?? "")) {+ failures.push(`${line}: ${lines[line - 1]?.trim() ?? ""}`);}}ts.forEachChild(node, visit);@@ -46,12 +50,12 @@ if (let files;try {files = execFileSync(- 'git',- ['ls-files', 'app/test/e2e/specs', 'app/test/playwright/specs'],- { encoding: 'utf8' }+ "git",+ ["ls-files", "app/test/e2e/specs", "app/test/playwright/specs"],+ { encoding: "utf8" },).trim()- .split('\n')+ .split("\n").filter(Boolean);} catch (error) {console.error(`Could not list browser specs: ${error.message}`);@@ -59,13 +63,13 @@ if (}const failures = [];for (const file of files) {- const badLines = untrackedSkipLines(readFileSync(file, 'utf8'));- failures.push(...badLines.map(line => `${file}:${line}`));+ const badLines = untrackedSkipLines(readFileSync(file, "utf8"));+ failures.push(...badLines.map((line) => `${file}:${line}`));}if (failures.length) {console.error(- 'Browser-test skips need a GitHub issue URL on the same line:\n' +- failures.map(line => ` ${line}`).join('\n')+ "Browser-test skips need a GitHub issue URL on the same line:\n" ++ failures.map((line) => ` ${line}`).join("\n"),);process.exit(1);}