import test from 'ava';
import cloneError, { errorProps } from './cloneError';
var errors = [new Error('Error Message'), new TypeError('Type Error'), 'Error String'];
test('cloneError', function (t) {
  for (var _i = 0; _i < errors.length; _i++) {
    var item = errors[_i];
    var clone = cloneError(item);
    var _iteratorNormalCompletion = true;
    var _didIteratorError = false;
    var _iteratorError = undefined;

    try {
      for (var _iterator = errorProps[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
        var key = _step.value;
        t.is(clone[key], item[key], key);
      }
    } catch (err) {
      _didIteratorError = true;
      _iteratorError = err;
    } finally {
      try {
        if (!_iteratorNormalCompletion && _iterator.return != null) {
          _iterator.return();
        }
      } finally {
        if (_didIteratorError) {
          throw _iteratorError;
        }
      }
    }
  }
});