Improve HTTP client function

This commit is contained in:
2025-11-03 22:15:45 +08:00
parent 5688304817
commit 300514531d
13 changed files with 1918 additions and 113 deletions

View File

@@ -73,7 +73,7 @@ describe('HTTP Grammar - @response 响应语法', () => {
expect(hasNode(state, 'ResponseDeclaration')).toBe(true);
expect(hasNode(state, 'ErrorStatus')).toBe(true);
expect(hasNode(state, 'TimeUnit')).toBe(true);
expect(hasNode(state, 'TimeValue')).toBe(true);
});
it('✅ 响应与请求结合', () => {
@@ -145,8 +145,8 @@ POST "https://api.example.com/users" {
const state = createTestState(content);
expect(hasNode(state, 'TimeUnit')).toBe(true);
expect(getNodeText(state, 'TimeUnit')).toBe('ms');
expect(hasNode(state, 'TimeValue')).toBe(true);
expect(getNodeText(state, 'TimeValue')).toBe('12345ms');
});
it('✅ 响应块包含复杂 JSON', () => {