MCPcopy Create free account
hub / github.com/TanStack/ai / readMessageCount

Function readMessageCount

testing/e2e/tests/tools-test/helpers.ts:96–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 */
95export async function runTest(page: Page): Promise<void> {
96 const readMessageCount = () =>
97 page.evaluate(() => {
98 const text =
99 document.getElementById('messages-json-content')?.textContent || '[]'
100 try {
101 const parsed = JSON.parse(text)
102 return Array.isArray(parsed) ? parsed.length : 0
103 } catch {
104 return 0
105 }
106 })
107
108 for (let attempt = 0; attempt < 5; attempt++) {
109 const baselineMessageCount = await readMessageCount()

Callers 1

runTestFunction · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected