test-workflow-provider-pass-through.js 574 B

123456789101112131415161718192021
  1. import fs from 'fs';
  2. function assert(condition, message) {
  3. if (!condition) throw new Error(message);
  4. }
  5. console.log('\n── Workflow Provider Pass-through ──');
  6. for (const file of [
  7. './src/tools/vl-generate.js',
  8. './src/tools/vl-adjust.js',
  9. './src/tools/workflow-run.js',
  10. ]) {
  11. const source = fs.readFileSync(new URL(file, import.meta.url), 'utf-8');
  12. assert(
  13. source.includes('llmProvider: config.llmProvider'),
  14. `${file} should pass the selected llmProvider into WorkflowExecutor`
  15. );
  16. }
  17. console.log('PASS test-workflow-provider-pass-through.js');