2019-10-06 09:31:40 -07:00

13 lines
270 B
JavaScript

const { addMatchers } = require('add-matchers');
require('jasmine-expect');
addMatchers({
toBeError(value) {
return value instanceof Error;
},
toBeErrorOfType(other, value) {
return value instanceof Error && value.name === other;
}
});