(path, body)
| 27 | let browser; |
| 28 | |
| 29 | async function json(path, body) { |
| 30 | const response = await fetch(ORIGIN + path, { method: body ? 'POST' : 'GET', |
| 31 | ...(body ? { headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) } : {}) }); |
| 32 | report.directRequests.push({ path, method: body ? 'POST' : 'GET', status: response.status }); |
| 33 | assert.ok(response.ok, `${path}: HTTP ${response.status}`); |
| 34 | return response.json(); |
| 35 | } |
| 36 | |
| 37 | function persistedRows(run) { |
| 38 | const script = `import json,sqlite3,sys,pathlib |
no test coverage detected