diff --git a/test/error-handler.test.js b/test/error-handler.test.js index 00419d27..55d612ed 100644 --- a/test/error-handler.test.js +++ b/test/error-handler.test.js @@ -10,16 +10,8 @@ var request = require('supertest'); var expect = require('chai').expect; describe('loopback.errorHandler(options)', function() { - it('should throw a descriptive error', function(done) { - try { - //arrange - var app = loopback(); - app.use(loopback.urlNotFound()); - app.use(loopback.errorHandler({ log: false })); - } catch (e) { - expect(function() { loopback.errorHandler(); }) + it('should throw a descriptive error', function() { + expect(function() { loopback.errorHandler(); }) .to.throw(/no longer available.*strong-error-handler/); - done(); - } }); });