UNPKG

366 BJavaScriptView Raw
1'use strict';
2
3var customError = require('es5-ext/error/custom')
4 , ee = require('../');
5
6module.exports = function (t, a) {
7 var x, error = customError('Some error', 'ERROR_TEST'), emitted;
8
9 x = ee();
10 a.throws(function () { t.call(x, error); }, 'ERROR_TEST');
11 x.on('error', function (err) { emitted = err; });
12 t.call(x, error);
13 a(emitted, error);
14};