okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-022-gpuroles: Main / Helper / Off per graphics card in the app, TUI, launch, setup, server and Dockere28889d12

main
931 B14 linesraw
1import test from 'node:test';
2import assert from 'node:assert/strict';
3import { readFile } from 'node:fs/promises';
4
5test('the card list preselects the card the loaded model runs on, and the sidebar card says the version and the card', async () => {
6  const models = await readFile(new URL('../src/components/NativeModels.tsx', import.meta.url), 'utf8');
7  assert.ok(models.indexOf('const loadedSelected = ') < models.indexOf('const loadedRoles = '));
8  assert.match(models, /fromLegacy\(loadedSelected\.gpus, roleCards, 'as_given'\)/);
9  assert.match(models, /roles \? normalizeRoles\(roles, roleCards\) : loadedRoles \?\? recommended\.roles/);
10  const side = await readFile(new URL('../src/app/Sidebar.tsx', import.meta.url), 'utf8');
11  assert.match(side, /nativeSize\?\.model \?\? nativeCurrent\.model\.toUpperCase\(\)/);
12  assert.match(side, /`GPU \$\{g \+ 1\}`/);
13  assert.ok(!side.includes('nativeCurrent?.apiModelId'));
14});