Skip to content
Myr

Improve error message when autoloading invalid view engine

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #3403

authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parent c3fb7e5 · Browse files · 4 files+28 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

4 files+28 added−1 removed

  • tests:+14 added−0 removed
  • other:+14 added−1 removed

4 files+28 added−1 removed

modified:lib/view.js+9 added-1 removed
added:test/fixtures/broken.send
modified:test/res.render.js+14 added
33 unmodified lines
34 .get('/')35 .expect('<p>tobi</p>', done);36 })3738 it('should error without "view engine" set and file extension to a non-engine module', function (done) {39 var app = createApp()4041 app.locals.user = { name: 'tobi' }4243 app.use(function (req, res) {44 res.render(path.join(__dirname, 'fixtures', 'broken.send'))45 })4647 request(app)48 .get('/')49 .expect(500, /does not provide a view engine/, done)50 })5152 it('should error without "view engine" set and no file extension', function (done) {53 var app = createApp();5455 app.locals.user = { name: 'tobi' };
311 unmodified lines
modified:History.md+5 added
1unreleased2==========34 * Improve error message when autoloading invalid view engine564.15.5 / 2017-09-247===================89 * deps: debug@2.6.9
3307 unmodified lines