okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
e28889d12
main
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 () => { 6const models = await readFile ( new URL ( '../src/components/NativeModels.tsx' , import . meta. url ), 'utf8' ); 7assert . ok ( models . indexOf ( 'const loadedSelected = ' ) < models . indexOf ( 'const loadedRoles = ' )); 8assert . match ( models , / fromLegacy\(loadedSelected\.gpus, roleCards, 'as_given'\) / ); 9assert . match ( models , / roles \? normalizeRoles\(roles, roleCards\) : loadedRoles \?\? recommended\.roles / ); 10const side = await readFile ( new URL ( '../src/app/Sidebar.tsx' , import . meta. url ), 'utf8' ); 11assert . match ( side , / nativeSize\?\.model \?\? nativeCurrent\.model\.toUpperCase\(\) / ); 12assert . match ( side , / `GPU \$\{g \+ 1\}` / ); 13assert . ok ( ! side . includes ( 'nativeCurrent?.apiModelId' )); 14});