mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-27 02:45:14 +00:00
13 lines
416 B
JavaScript
13 lines
416 B
JavaScript
|
"use strict";
|
||
|
|
||
|
module.exports = function (t, a) {
|
||
|
var T = t, err = new T("My Error", "MY_ERROR", { errno: 123 });
|
||
|
a(err instanceof Error, true, "Instance of error");
|
||
|
a(err.constructor, Error, "Constructor");
|
||
|
a(err.name, "Error", "Name");
|
||
|
a(String(err), "Error: My Error", "String representation");
|
||
|
a(err.code, "MY_ERROR", "Code");
|
||
|
a(err.errno, 123, "Errno");
|
||
|
a(typeof err.stack, "string", "Stack trace");
|
||
|
};
|