Add integration tests for /weather and /research endpoints #5
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#L383
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\":26,\"data\":null}"
❯ api.integration.test.ts:383:37
|
|
api.integration.test.ts > GET /research – edge cases > empty topic string does not return research data as if valid:
api.integration.test.ts#L357
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:357:44
|
|
api.integration.test.ts > GET /research – response timing > response time is at least 3 seconds (as documented):
api.integration.test.ts#L328
AssertionError: expected 91 to be greater than or equal to 3000
❯ api.integration.test.ts:328:18
|
|
api.integration.test.ts > GET /research – happy path > response contains content relevant to the researched topic:
api.integration.test.ts#L313
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:313:34
|
|
api.integration.test.ts > GET /weather – edge cases > consecutive calls for same city return consistent (non-empty) responses:
api.integration.test.ts#L244
AssertionError: expected '{"status":"throttled","message":"rate…' to contain 'tokyo'
Expected: "tokyo"
Received: "{"status":"throttled","message":"rate limit exceeded. please wait.","retry_after_seconds":27,"data":null}"
❯ api.integration.test.ts:244:37
|
|
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#L222
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:222:44
|
|
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#L201
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:201:44
|
|
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#L189
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ api.integration.test.ts:189:44
|
|
api.integration.test.ts > GET /weather – case sensitivity > lowercase and mixed-case city produce the same result:
api.integration.test.ts#L164
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:164:37
|
|
api.integration.test.ts > GET /weather – happy path > response references the multi-word city (New York):
api.integration.test.ts#L144
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:144:21
|