feat: полный бэк и фронт (попытки, разбор, импорт, ИИ, назначения)
- Сервисы: testAttemptService, testAccess, document import/gen/extract, LLM, assignment, aiEditor - Конфиг: devAuthor, featureFlags; messages/ru; интеграция V.9 (skip без БД) - API/роуты: app, auth, server; Dockerfile и env example - Фронт: TestAttempt, TestAttemptReview, AttemptReviewBlock, стили, правки App/api/login/vite - compose и README; смоук-тесты расширены Закрывает отсутствие модулей в origin после клона. Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { parseAndValidateShape } from './aiEditorService.js';
|
||||
|
||||
test('parseAndValidateShape: валидный ввод', () => {
|
||||
const s = parseAndValidateShape([
|
||||
{ optionsCount: 3, hasMultipleAnswers: false },
|
||||
{ optionsCount: 2, hasMultipleAnswers: true },
|
||||
]);
|
||||
assert.equal(s.length, 2);
|
||||
assert.equal(s[0].optionsCount, 3);
|
||||
assert.equal(s[1].hasMultipleAnswers, true);
|
||||
});
|
||||
|
||||
test('parseAndValidateShape: пусто — ошибка', () => {
|
||||
assert.throws(
|
||||
() => parseAndValidateShape([]),
|
||||
/Передайте/
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user