MCPcopy Create free account
hub / github.com/AI45Lab/Code / main

Function main

sdk/node/examples/basic/test_runtime_nesting.ts:153–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151
152// Main
153async function main() {
154 const configPath = findConfig();
155 if (!hasRealProviderConfig(configPath)) {
156 console.log('Nested runtime example skipped.');
157 console.log('Set OPENAI_API_KEY and OPENAI_BASE_URL, or set A3S_CONFIG to a real config.');
158 process.exit(0);
159 }
160
161 let allPassed = true;
162
163 allPassed = await simulateNestedRuntime() && allPassed;
164 allPassed = await testConcurrentSessions() && allPassed;
165
166 console.log();
167 if (allPassed) {
168 console.log('✓ All tests passed!');
169 process.exit(0);
170 } else {
171 console.log('✗ Some tests failed');
172 process.exit(1);
173 }
174}
175
176main().catch(e => {
177 console.error('Fatal error:', e);

Callers 1

Calls 5

findConfigFunction · 0.85
hasRealProviderConfigFunction · 0.85
simulateNestedRuntimeFunction · 0.85
testConcurrentSessionsFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected