fix(tests): Fix tests and documentation: adjust test server routes and expectations, add timeout/fallback routes, and refresh README
This commit is contained in:
		| @@ -16,7 +16,7 @@ tap.test('setup test server', async () => { | ||||
|   testServer.addRoute( | ||||
|     '/apiroute1', | ||||
|     new typedserver.servertools.Handler('GET', (req, res) => { | ||||
|       res.status(429); | ||||
|       res.status(500); | ||||
|       res.end(); | ||||
|     }), | ||||
|   ); | ||||
| @@ -48,7 +48,6 @@ tap.test('should handle fallback URLs', async () => { | ||||
|     { | ||||
|       fallbackUrls: [ | ||||
|         'http://localhost:2345/apiroute2', | ||||
|         'http://localhost:2345/apiroute4', | ||||
|         'http://localhost:2345/apiroute3', | ||||
|       ], | ||||
|       retry: { | ||||
| @@ -59,6 +58,8 @@ tap.test('should handle fallback URLs', async () => { | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|   expect(response.ok).toEqual(true); | ||||
|   expect(response.status).toEqual(200); | ||||
|   const data = await response.json(); | ||||
|   console.log('response with fallbacks: ' + JSON.stringify(data)); | ||||
|   expect(data).toHaveProperty('hithere'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user