mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	error message has changed
This commit is contained in:
		
							parent
							
								
									0c5efbf756
								
							
						
					
					
						commit
						ded37729d5
					
				| @ -84,15 +84,17 @@ describe("ProxyAgent", function () { | ||||
|     it("should report error when proxy fails", async function() { | ||||
|       // if the proxy isn't listening, fetches produces error messages.
 | ||||
|       await testProxyServer.dispose(); | ||||
|       // Error message depends a little on node version.
 | ||||
|       const logMessages2 = await captureLog('warn', async () => { | ||||
|         await assert.isRejected(testFetch('/200'), /ECONNREFUSED/); | ||||
|         await assert.isRejected(testFetch('/404'), /ECONNREFUSED/); | ||||
|         await assert.isRejected(testFetch('/200'), /(request.*failed)|(ECONNREFUSED)/); | ||||
|         await assert.isRejected(testFetch('/404'), /(request.*failed)|(ECONNREFUSED)/); | ||||
|       }); | ||||
| 
 | ||||
|       // We rely on "ProxyAgent error" message to detect issues with the proxy server.
 | ||||
|       // Error message depends a little on node version.
 | ||||
|       assertMatchArray(logMessages2, [ | ||||
|         /warn: ProxyAgent error.*ECONNREFUSED/, | ||||
|         /warn: ProxyAgent error.*ECONNREFUSED/, | ||||
|         /warn: ProxyAgent error.*((request.*failed)|(ECONNREFUSED))/, | ||||
|         /warn: ProxyAgent error.*((request.*failed)|(ECONNREFUSED))/, | ||||
|       ]); | ||||
|     }); | ||||
|   }); | ||||
|  | ||||
| @ -51,7 +51,8 @@ describe('UnhandledErrors', function() { | ||||
|         }, 1000, 100); | ||||
| 
 | ||||
|         // We expect the server to be dead now.
 | ||||
|         await assert.isRejected(fetch(`${server.serverUrl}/status`), /failed.*ECONNREFUSED/); | ||||
|         // Error message depends a little on node version.
 | ||||
|         await assert.isRejected(fetch(`${server.serverUrl}/status`), /(request.*failed)|(ECONNREFUSED)/); | ||||
| 
 | ||||
|       } finally { | ||||
|         await server.stop(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user