diff --git a/scripts/react-cockpit/deep-agents-skills-configuration.spec.mjs b/scripts/react-cockpit/deep-agents-skills-configuration.spec.mjs index acc272f40..0b2356146 100644 --- a/scripts/react-cockpit/deep-agents-skills-configuration.spec.mjs +++ b/scripts/react-cockpit/deep-agents-skills-configuration.spec.mjs @@ -29,6 +29,10 @@ test('Skills fixture uses only closed authored selection and awaited shutdown', ); assert.match( source, - /await \(deepAgentsSubagentsFixture \?\? deepAgentsSkillsFixture \?\?/ + /if \((?:\w+Fixture \|\| )*deepAgentsSkillsFixture(?: \|\| \w+Fixture)*\)/ + ); + assert.match( + source, + /await \((?:\w+Fixture \?\? )*deepAgentsSkillsFixture(?: \?\? \w+Fixture)*\)\.close\(\)/ ); }); diff --git a/scripts/react-cockpit/deep-agents-subagents-configuration.spec.mjs b/scripts/react-cockpit/deep-agents-subagents-configuration.spec.mjs index 3265fd64b..ad34bc354 100644 --- a/scripts/react-cockpit/deep-agents-subagents-configuration.spec.mjs +++ b/scripts/react-cockpit/deep-agents-subagents-configuration.spec.mjs @@ -14,6 +14,6 @@ test('closed native Subagents selection', () => { import { readFileSync } from 'node:fs'; test('native fixture participates in awaited serve shutdown', () => { const source = readFileSync(new URL('./serve.mjs', import.meta.url), 'utf8'); - assert.match(source, /if \(deepAgentsSubagentsFixture \|\|/); - assert.match(source, /await \(deepAgentsSubagentsFixture \?\?/); + assert.match(source, /if \((?:\w+Fixture \|\| )*deepAgentsSubagentsFixture(?: \|\| \w+Fixture)*\)/); + assert.match(source, /await \((?:\w+Fixture \?\? )*deepAgentsSubagentsFixture(?: \?\? \w+Fixture)*\)\.close\(\)/); });