Skip to content

Instantly share code, notes, and snippets.

View anandnimkar's full-sized avatar

Anand Nimkar anandnimkar

View GitHub Profile
@anandnimkar
anandnimkar / index.test.ts
Created June 29, 2018 03:42
toEqual does not deep equal check custom error objects
export class EError extends Error {
type: string;
data: { [key: string]: any } | undefined;
constructor(message: string, type: string, data?: { [key: string]: any }) {
super(message);
this.type = type;
this.data = data;
this.name = this.constructor.name;