"use strict";

var _getFullErrorMessage = _interopRequireDefault(require("./getFullErrorMessage"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

describe('Get Full Error Message', () => {
  test('should return string if passed a string', () => {
    const error = 'test error';
    expect((0, _getFullErrorMessage.default)(error)).toBe(`"${error}"`);
  });
  test('should return string if passed an Error object', () => {
    const error = new Error('test error');
    const errorMessage = (0, _getFullErrorMessage.default)(error);
    expect(typeof errorMessage).toBe('string');
    expect(errorMessage).toMatch(/test error/);
  });
});