Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var functionsHaveNames = require('functions-have-names')();
var boundFunctionsHaveNames = require('functions-have-names').boundFunctionsHaveNames();
var forEach = require('for-each');
var inspect = require('object-inspect');
module.exports = function (AggregateError, t) {
t.test('constructor', function (st) {
st.equal(typeof AggregateError, 'function', 'is a function');
st.equal(AggregateError.length, 2, 'AggregateError has a length of 2');
st.test('Function name', { skip: !functionsHaveNames || !boundFunctionsHaveNames }, function (s2t) {
s2t.equal(AggregateError.name, 'AggregateError', 'AggregateError has name "AggregateError"');
s2t.end();
});
st.end();
});