fix: complete image_make asset delivery

This commit is contained in:
john
2026-07-19 19:09:26 +08:00
parent 9cf12e3786
commit 72ed4dde83
7 changed files with 66 additions and 6 deletions
+8
View File
@@ -1,7 +1,15 @@
import assert from 'node:assert/strict';
import fs from 'node:fs';
import test from 'node:test';
import { createMindSpaceImageGenerationService } from './mindspace-image-generation.mjs';
test('MindSpace asset schema accepts image_make as a source type', () => {
const schemaSql = fs.readFileSync(new URL('./schema.sql', import.meta.url), 'utf8');
const dbSource = fs.readFileSync(new URL('./db.mjs', import.meta.url), 'utf8');
assert.match(schemaSql, /source_type ENUM\([^\n]*'image_make'/);
assert.match(dbSource, /MODIFY source_type ENUM\([^\n]*'image_make'/);
});
test('MindSpace image generation stays inert while the admin purpose is disabled', async () => {
const service = createMindSpaceImageGenerationService({
configService: {