Sha256: 06e15d78336a02ce925aa66e6c8fe42e3c4e862e92426f6443849b0de96178a6

Contents?: true

Size: 366 Bytes

Versions: 53

Compression:

Stored size: 366 Bytes

Contents

'use strict';

var customError = require('es5-ext/error/custom')
  , ee          = require('../');

module.exports = function (t, a) {
	var x, error = customError('Some error', 'ERROR_TEST'), emitted;

	x = ee();
	a.throws(function () { t.call(x, error); }, 'ERROR_TEST');
	x.on('error', function (err) { emitted = err; });
	t.call(x, error);
	a(emitted, error);
};

Version data entries

53 entries across 53 versions & 7 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.21.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.20.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.19.1 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.19.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.18.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.17.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.16.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.15.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.14.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.13.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.12.2 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.12.1 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.12.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.11.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.10.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.9.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.8.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.7.0 node_modules/event-emitter/test/emit-error.js
govuk_publishing_components-17.6.1 node_modules/event-emitter/test/emit-error.js