(baseUrl, uri, expected)
| 18 | }) |
| 19 | |
| 20 | function addTest (baseUrl, uri, expected) { |
| 21 | tape('test baseurl="' + baseUrl + '" uri="' + uri + '"', function (t) { |
| 22 | request(uri, { baseUrl: baseUrl }, function (err, resp, body) { |
| 23 | t.equal(err, null) |
| 24 | t.equal(body, 'ok') |
| 25 | t.equal(resp.headers['x-path'], expected) |
| 26 | t.end() |
| 27 | }) |
| 28 | }) |
| 29 | } |
| 30 | |
| 31 | function addTests () { |
| 32 | addTest(s.url, '', '/') |