UNPKG

node-simple-ipc

Version:

A Node.Js module for local Inter Process Communication

18 lines 798 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const serialize_error_1 = require("./serialize-error"); describe('serializeError()', function () { it('should return error name, message and trace.', function () { const remoteError = (0, serialize_error_1.serializeError)(new Error('Test')); expect(remoteError).toHaveProperty('message', 'Test'); expect(remoteError).toHaveProperty('name', 'Error'); expect(remoteError).toHaveProperty('stack'); expect(Object.keys(remoteError)).toHaveLength(3); }); it('should return just error name.', function () { expect((0, serialize_error_1.serializeError)(123)).toEqual({ message: '123', }); }); }); //# sourceMappingURL=serialize-error.spec.js.map