Add integration tests for /weather and /research endpoints #9
Annotations
10 errors
|
api.integration.test.ts > GET /research – edge cases > two requests for the same topic return consistent (non-empty) responses:
api.integration.test.ts#L296
AssertionError: expected '{"status":"throttled","message":"rate…' to match /solar|energy|renewable/
- Expected:
/solar|energy|renewable/
+ Received:
"{\"status\":\"throttled\",\"message\":\"rate limit exceeded. please wait.\",\"retry_after_seconds\":27,\"data\":null}"
❯ api.integration.test.ts:296:35
|
|
api.integration.test.ts > GET /research – edge cases > empty topic string does not return research data as if valid:
api.integration.test.ts#L278
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:278:42
|
|
api.integration.test.ts > GET /research – response timing > response time is at least 3 seconds (as documented):
api.integration.test.ts#L259
AssertionError: expected 89 to be greater than or equal to 3000
❯ api.integration.test.ts:259:16
|
|
api.integration.test.ts > GET /research – happy path > response contains content relevant to the researched topic:
api.integration.test.ts#L248
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:248:32
|
|
api.integration.test.ts > GET /weather – edge cases > consecutive calls for same city return consistent (non-empty) responses:
api.integration.test.ts#L197
AssertionError: expected '{"status":"throttled","message":"rate…' to contain 'tokyo'
Expected: "tokyo"
Received: "{"status":"throttled","message":"rate limit exceeded. please wait.","retry_after_seconds":28,"data":null}"
❯ api.integration.test.ts:197:35
|
|
api.integration.test.ts > GET /weather – edge cases > numeric string as location returns an error or empty data (not real weather):
api.integration.test.ts#L181
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:181:42
|
|
api.integration.test.ts > GET /weather – edge cases > empty location string does not return weather data as if it were valid:
api.integration.test.ts#L166
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:166:42
|
|
api.integration.test.ts > GET /weather – edge cases > non-existent city returns a clear error or non-200 status (not silent success):
api.integration.test.ts#L157
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:157:42
|
|
api.integration.test.ts > GET /weather – case sensitivity > lowercase and mixed-case city produce the same result:
api.integration.test.ts#L135
AssertionError: expected '{"status":"throttled","message":"rate…' to contain 'london'
Expected: "london"
Received: "{"status":"throttled","message":"rate limit exceeded. please wait.","retry_after_seconds":28,"data":null}"
❯ api.integration.test.ts:135:35
|
|
api.integration.test.ts > GET /weather – happy path > response references the multi-word city (New York):
api.integration.test.ts#L118
AssertionError: expected '{"status":"throttled","message":"rate…' to contain 'new york'
Expected: "new york"
Received: "{"status":"throttled","message":"rate limit exceeded. please wait.","retry_after_seconds":28,"data":null}"
❯ api.integration.test.ts:118:19
|