(headers)
| 57 | } |
| 58 | |
| 59 | function headersToString(headers) { |
| 60 | var str = []; |
| 61 | for (var key in headers) { |
| 62 | str.push(key + ': ' + headers[key]); |
| 63 | } |
| 64 | return str.join('\n'); |
| 65 | } |
| 66 | |
| 67 | function expectRequest(method, path, data, headers) { |
| 68 | var description = method + ' ' + path + '\n' + headersToString(headers) + |