mirror of
https://github.com/R0m1k3/chesspreview.git
synced 2026-10-16 11:47:30 +02:00
Build Atelier 64 chess training app
This commit is contained in:
commit
3dd0aa9a09
15 files changed
+2574
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { normalizeOllamaUrl, parseInfo } from './engine.js';
|
||||
|
||||
test('parse une ligne MultiPV Stockfish', () => {
|
||||
assert.deepEqual(parseInfo('info depth 16 multipv 2 score cp -34 nodes 4 pv e2e4 e7e5'), {
|
||||
depth: 16, multipv: 2, score: { type: 'cp', value: -34 }, pv: ['e2e4', 'e7e5'],
|
||||
});
|
||||
});
|
||||
|
||||
test('normalise URL Ollama', () => {
|
||||
assert.equal(normalizeOllamaUrl('http://192.168.1.3:11434/'), 'http://192.168.1.3:11434');
|
||||
assert.throws(() => normalizeOllamaUrl('file:///etc/passwd'));
|
||||
});
|
||||
Reference in new issue
Block a user