You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
483 B
20 lines
483 B
var test = require('tape') |
|
, errors = require('./') |
|
|
|
test('all errors are instances of LevelUPError', function (t) { |
|
var LevelUPError = errors.LevelUPError |
|
, keys = Object.keys(errors) |
|
|
|
keys.forEach(function (key) { |
|
t.ok(new errors[key]() instanceof LevelUPError) |
|
}) |
|
|
|
t.end() |
|
}) |
|
|
|
test('NotFoundError has special properties', function (t) { |
|
var error = new errors.NotFoundError() |
|
t.equal(error.notFound, true) |
|
t.equal(error.status, 404) |
|
t.end() |
|
})
|
|
|