Newer
Older
alert / js / node_modules / stream-http / test / browser / error.js.disabled
@Réz István Réz István on 18 Nov 2021 280 bytes first commit
var Buffer = require('buffer').Buffer
var test = require('tape')

var http = require('../..')

test('error handling', function (t) {
	var req = http.get('https://0.0.0.0:0/fail.txt')
	req.on('error', function (err) {
		t.ok(err && ('message' in err), 'got error')
		t.end()
	})
})