()
| 142 | |
| 143 | // 运行所有测试查询 |
| 144 | async function runTests() { |
| 145 | console.log('🧪 Starting test queries...\n'); |
| 146 | |
| 147 | for (const test of testQueries) { |
| 148 | console.log(`\n📋 Running test: ${test.name}`); |
| 149 | try { |
| 150 | const response = await queryServer(test.query); |
| 151 | console.log('\n✅ Response:', JSON.stringify(response, null, 2)); |
| 152 | } catch (error) { |
| 153 | console.error('\n❌ Error:', error.message); |
| 154 | } |
| 155 | // 等待一下,避免服务器进程冲突 |
| 156 | await new Promise(resolve => setTimeout(resolve, 1000)); |
| 157 | } |
| 158 | |
| 159 | console.log('\n🎉 All tests completed!'); |
| 160 | } |
| 161 | |
| 162 | // 执行测试 |
| 163 | runTests().catch(error => { |
no test coverage detected