]> git.r.bdr.sh - rbdr/dotfiles/blob
d4ff500c9b30f2ccba64f58b52704bc4d0847aa0
[rbdr/dotfiles] /
1 'use strict';
2
3 module.exports = function (t, a) {
4 var T = t, err = new T('My Error', 'MY_ERROR', { errno: 123 });
5 a(err instanceof Error, true, "Instance of error");
6 a(err.constructor, Error, "Constructor");
7 a(err.name, 'Error', "Name");
8 a(String(err), 'Error: My Error', "String representation");
9 a(err.code, 'MY_ERROR', "Code");
10 a(err.errno, 123, "Errno");
11 a(typeof err.stack, 'string', "Stack trace");
12 };