error.js.disabled 280B

123456789101112
  1. var Buffer = require('buffer').Buffer
  2. var test = require('tape')
  3. var http = require('../..')
  4. test('error handling', function (t) {
  5. var req = http.get('https://0.0.0.0:0/fail.txt')
  6. req.on('error', function (err) {
  7. t.ok(err && ('message' in err), 'got error')
  8. t.end()
  9. })
  10. })