Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

test(benchmark): the export guard follows the new score column

Davida18efa703f68
diff --git a/src/stores/__tests__/benchmark-management.test.ts b/src/stores/__tests__/benchmark-management.test.ts
index 51a939a8..f673d74e 100644
--- a/src/stores/__tests__/benchmark-management.test.ts
+++ b/src/stores/__tests__/benchmark-management.test.ts
@@ -90,14 +90,15 @@ describe('markdown export', () => {
expect(md).toContain('# Local model benchmark')
expect(md).toContain('2026-08-01 12:00')
- expect(md).toContain('| # | Model | Average t/s | Latest t/s | Avg tokens | Think | Correct | Runs |')
+ expect(md).toContain('| # | Model | Score | Average t/s | Latest t/s | Avg tokens | Think | Correct | Runs |')
// Ranked fastest first, same order as the leaderboard on screen.
expect(md.indexOf('fast:3b')).toBeLessThan(md.indexOf('slow:70b'))
- expect(md).toMatch(/\| 1 \| fast:3b \| 41 \|/)
- expect(md).toMatch(/\| 2 \| slow:70b \| 4 \|/)
+ // Score first, then the speeds: the table prints what it is sorted by.
+ expect(md).toMatch(/\| 1 \| fast:3b \| \d+ \| 41 \| 41 \|/)
+ expect(md).toMatch(/\| 2 \| slow:70b \| \d+ \| 4 \| 4 \|/)
// These runs predate the economy fields, so those columns read as a dash
// rather than a wrong number.
- expect(md).toMatch(/\| 1 \| fast:3b \| 41 \| 41 \| - \| - \| - \| 2 \|/)
+ expect(md).toMatch(/\| 1 \| fast:3b \| \d+ \| 41 \| 41 \| - \| - \| - \| 2 \|/)
expect(md).toContain('3 runs across 2 models.')
})