feat: round-memory врезки записи памяти кругов в живую оркестрацию SP2c-1 ч2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,8 @@ import { describe, it, expect } from 'vitest';
|
||||
import { mkdtempSync } from 'node:fs';
|
||||
import { tmpdir } from 'node:os';
|
||||
import { join } from 'node:path';
|
||||
import { recordArtifact } from './round-memory-record.mjs';
|
||||
import { getVersions, getArgs } from './round-memory-store.mjs';
|
||||
import { recordArtifact, recordSideObjection } from './round-memory-record.mjs';
|
||||
import { getVersions, getArgs, getObjections } from './round-memory-store.mjs';
|
||||
|
||||
const dir = () => mkdtempSync(join(tmpdir(), 'rmrec-'));
|
||||
|
||||
@@ -35,3 +35,20 @@ describe('recordArtifact', () => {
|
||||
expect(() => recordArtifact('t1', 'plan', null, '\0bad')).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
describe('recordSideObjection', () => {
|
||||
it('пишет дословное замечание стороны в дорожку', () => {
|
||||
const d = dir();
|
||||
recordSideObjection('t1', 'plan', 'judge', 'замечание судьи', d);
|
||||
expect(getObjections('t1', 'plan', 'judge', d)).toEqual(['замечание судьи']);
|
||||
});
|
||||
it('пустой текст не пишется', () => {
|
||||
const d = dir();
|
||||
recordSideObjection('t1', 'plan', 'mentor', '', d);
|
||||
recordSideObjection('t1', 'plan', 'mentor', null, d);
|
||||
expect(getObjections('t1', 'plan', 'mentor', d)).toEqual([]);
|
||||
});
|
||||
it('fail-quiet на мусоре не кидает', () => {
|
||||
expect(() => recordSideObjection('t1', 'plan', 'judge', 'x', '\0bad')).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user