mirror of
https://github.com/Heretek-AI/GDevelop-Heretek.git
synced 2026-10-12 02:02:42 +00:00
fix: align plan tool test with W11 dependsOn semantics
create_or_update_plan omits `dependsOn` when the caller did not send it
(08a49e2f5, W11), but the spec still expected it normalized to []. Lock
in both cases instead: omitted stays absent, provided is kept and
trimmed. This is the failure blocking PR #148 CI; the spec was stale on
master itself.
This commit is contained in:
@@ -37,6 +37,8 @@ describe('server-side handled tools', () => {
|
||||
],
|
||||
});
|
||||
expect(result.success).toBe(true);
|
||||
// W11: `dependsOn` is only set when the caller sent it, so an omitted
|
||||
// `dependsOn` stays absent rather than being normalized to `[]`.
|
||||
expect((result: any).plan).toEqual({
|
||||
tasks: [
|
||||
{
|
||||
@@ -44,7 +46,30 @@ describe('server-side handled tools', () => {
|
||||
title: 'Write the GDD',
|
||||
description: 'Sections: overview, economy.',
|
||||
status: 'pending',
|
||||
dependsOn: [],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const withDependencies = await launch('create_or_update_plan', {
|
||||
tasks: [
|
||||
{
|
||||
id: 'gdd',
|
||||
title: 'Write the GDD',
|
||||
description: 'Sections: overview, economy.',
|
||||
status: 'pending',
|
||||
dependsOn: [' research '],
|
||||
},
|
||||
],
|
||||
});
|
||||
expect(withDependencies.success).toBe(true);
|
||||
expect((withDependencies: any).plan).toEqual({
|
||||
tasks: [
|
||||
{
|
||||
id: 'gdd',
|
||||
title: 'Write the GDD',
|
||||
description: 'Sections: overview, economy.',
|
||||
status: 'pending',
|
||||
dependsOn: ['research'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user