blob: ec91fb8defa7907fb8ef236e559ceef9af8016e0 [file] [log] [blame]
var test = require('../');
function fn() {
throw new TypeError('RegExp');
}
test('throws', function (t) {
t.throws(fn);
t.end();
});
test('throws (RegExp match)', function (t) {
t.throws(fn, /RegExp/);
t.end();
});
test('throws (Function match)', function (t) {
t.throws(fn, TypeError);
t.end();
});