Try using httpbin in tests, cuz CI runner is hanging on example.com

This commit is contained in:
Alex Gleason 2024-01-22 11:43:46 -06:00
parent 8eccdafa64
commit 4bec5f6f78
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import { assert, assertRejects } from '@/deps-test.ts';
import { assertEquals, assertRejects } from '@/deps-test.ts';
import { fetchWorker } from './fetch.ts';
@ -7,9 +7,9 @@ await sleep(2000);
Deno.test({
name: 'fetchWorker',
async fn() {
const response = await fetchWorker('https://example.com');
const text = await response.text();
assert(text.includes('Example Domain'));
const response = await fetchWorker('http://httpbin.org/get');
const json = await response.json();
assertEquals(json.headers.Host, 'httpbin.org');
},
sanitizeResources: false,
});