okami.mom/strata

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

Niko1221Start-up line: an installed engine with no model loaded is not 'No Strata engine' (J), and the wrong-make notice wiring5b4db785c

main
1.2 KiB21 linesraw
1/** The start-up "inference" line: an installed engine with no model loaded is not "No Strata engine" (rx9070 AppImage, second start). */
2import test from 'node:test';
3import assert from 'node:assert/strict';
4import { inferenceLine } from '../server/inference.mjs';
5
6const none = { kind: 'unavailable', name: 'No Strata engine' };
7
8test('a restart with the engine installed and no model loaded says so', () => {
9  const line = inferenceLine({ backend: none, engine: { usable: true, engine: { version: '0.1.45.3' } } });
10  assert.equal(line, 'Strata engine 0.1.45.3 is installed; no model is loaded yet');
11});
12
13test('no usable engine keeps the plain reason', () => {
14  assert.equal(inferenceLine({ backend: none, engine: { usable: false, notice: 'This Strata is for AMD cards.' } }), 'No Strata engine for this PC. This Strata is for AMD cards.');
15  assert.equal(inferenceLine({ backend: none, engine: null }), 'No Strata engine');
16});
17
18test('a running worker and the unpacking message are unchanged', () => {
19  assert.equal(inferenceLine({ backend: { kind: 'strata', name: 'Strata engine' }, engine: null }), 'Strata engine');
20  assert.match(inferenceLine({ backend: none, settled: false }), /^unpacking/);
21});