|
|
@@ -75,6 +75,12 @@ const mockUser = {
|
|
|
// 只在有真实Agora配置时运行这些测试
|
|
|
const hasRealAgoraConfig = process.env.AGORA_APP_ID && process.env.AGORA_APP_SECRET;
|
|
|
|
|
|
+// 调试信息
|
|
|
+console.debug('Agora配置检查:');
|
|
|
+console.debug('AGORA_APP_ID:', process.env.AGORA_APP_ID ? '已设置' : '未设置');
|
|
|
+console.debug('AGORA_APP_SECRET:', process.env.AGORA_APP_SECRET ? '已设置' : '未设置');
|
|
|
+console.debug('hasRealAgoraConfig:', hasRealAgoraConfig);
|
|
|
+
|
|
|
|
|
|
describe('AgoraSTTComponent 真实API集成测试', () => {
|
|
|
let client: ReturnType<typeof testClient<typeof agoraApiRoutes>>['api']['v1'];
|
|
|
@@ -117,9 +123,13 @@ describe('AgoraSTTComponent 真实API集成测试', () => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ console.debug('API响应状态:', response.status);
|
|
|
+ console.debug('API响应头:', response.headers);
|
|
|
+
|
|
|
expect(response.status).toBe(200);
|
|
|
|
|
|
const data = await response.json();
|
|
|
+ console.debug('API响应数据:', data);
|
|
|
|
|
|
// 验证真实Token格式
|
|
|
if ('token' in data) {
|