// Copyright IBM Corp. 2015,2016. All Rights Reserved. // Node module: loopback // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT var loopback = require('../'); var app; var expect = require('chai').expect; var request = require('supertest'); describe('loopback.errorHandler(options)', function() { it('should return default middleware when options object is not present', function(done) { //arrange var app = loopback(); app.use(loopback.urlNotFound()); app.use(loopback.errorHandler({ log: false })); //act/assert request(app) .get('/url-does-not-exist') .end(function(err, res) { expect(res.error.text).to.match( /