comparison js_fetch_objects.t @ 1822:de6aeda5c274

Tests: removed excessive tab characters from js_fetch_objects.t.
author Dmitry Volyntsev <xeioex@nginx.com>
date Mon, 06 Feb 2023 09:36:14 -0800
parents 1792ba2e8026
children 0152ce2de27f
comparison
equal deleted inserted replaced
1821:1792ba2e8026 1822:de6aeda5c274
480 async function fetch(r) { 480 async function fetch(r) {
481 const tests = [ 481 const tests = [
482 ['method', async () => { 482 ['method', async () => {
483 var req = new Request("http://127.0.0.1:$p0/method", 483 var req = new Request("http://127.0.0.1:$p0/method",
484 {method: 'PUT'}); 484 {method: 'PUT'});
485 var r = await ngx.fetch(req); 485 var r = await ngx.fetch(req);
486 var body = await r.text(); 486 var body = await r.text();
487 return `\${r.url}: \${r.status} \${body} \${r.headers.get('a')}`; 487 return `\${r.url}: \${r.status} \${body} \${r.headers.get('a')}`;
488 }, 'http://127.0.0.1:$p0/method: 200 PUT null'], 488 }, 'http://127.0.0.1:$p0/method: 200 PUT null'],
489 ['request body', async () => { 489 ['request body', async () => {
490 var req = new Request("http://127.0.0.1:$p0/body", 490 var req = new Request("http://127.0.0.1:$p0/body",
491 {body: 'foo'}); 491 {body: 'foo'});
492 var r = await ngx.fetch(req); 492 var r = await ngx.fetch(req);
493 var body = await r.text(); 493 var body = await r.text();
494 return `\${r.url}: \${r.status} \${body}`; 494 return `\${r.url}: \${r.status} \${body}`;
495 }, 'http://127.0.0.1:$p0/body: 201 foo'], 495 }, 'http://127.0.0.1:$p0/body: 201 foo'],
496 ]; 496 ];
497 497
498 run(r, tests); 498 run(r, tests);