1 | ;
|
2 |
|
3 | var customError = require('es5-ext/error/custom')
|
4 | , ee = require('../');
|
5 |
|
6 | module.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 | };
|