mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-01-23 00:58:57 +07:00
Update to Node 24
Update fetch.ts to use native fetch() API Use immutable sort in tools.ts
This commit is contained in:
@@ -19,7 +19,9 @@ it('checking fetch', async () => {
|
||||
Location: host_url + '/pong'
|
||||
})
|
||||
.get('/pong')
|
||||
.reply(200, 'pong');
|
||||
.reply(200, 'pong')
|
||||
.get('/error')
|
||||
.replyWithError('Network failure');
|
||||
|
||||
let response: Record<string, string> = await fetch.fetch(manifest_url);
|
||||
expect(response.error).toBe(undefined);
|
||||
@@ -36,4 +38,8 @@ it('checking fetch', async () => {
|
||||
response = await fetch.fetch(manifest_url, 'invalid_token');
|
||||
expect(response.error).not.toBe(undefined);
|
||||
expect(response.data).toBe(undefined);
|
||||
|
||||
response = await fetch.fetch(host_url + '/error');
|
||||
expect(response.error).toContain('Fetch error:');
|
||||
expect(response.data).toBe(undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user