Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Report the scene_create error in the native fallback job test instead of a TypeError

Nguyen Xuan An41f3d65773ea
diff --git a/tests/native-fallback-job.test.js b/tests/native-fallback-job.test.js
index 8f0446c3..79f25e58 100644
--- a/tests/native-fallback-job.test.js
+++ b/tests/native-fallback-job.test.js
@@ -31,7 +31,9 @@ async function renderDemoRoom(requestedBackend, workDirectory) {
try {
const call = (name, toolArguments) => client.callTool({ name, arguments: toolArguments }, { timeout: 300000 });
const recipe = JSON.parse(await readFile(recipeUrl, 'utf8'));
- const created = (await call('scene_create', { recipe })).structuredContent;
+ const createResult = await call('scene_create', { recipe });
+ assert.notEqual(createResult.isError, true, createResult.content?.[0]?.text);
+ const created = createResult.structuredContent;
const settings = { kind: 'image', width: 64, height: 64, renderer: { type: 'pathTracer', backend: requestedBackend, samples: 2, bounces: 2, denoise: false, seed: 3, maxSeconds: 120 } };
const submitted = await call('scene_render_submit', { sessionId: created.sessionId, expectedRevision: 0, settings });
assert.notEqual(submitted.isError, true, submitted.content?.[0]?.text);