Skip to content

Commit 75e47f2

Browse files
committed
Add test for "view engine" setting with leading ".".
1 parent a4b2e48 commit 75e47f2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/app.engine.js

+15
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,20 @@ describe('app', function(){
6161
done();
6262
})
6363
})
64+
65+
it('should work "view engine" with leading "."', function(done){
66+
var app = express();
67+
68+
app.set('views', __dirname + '/fixtures');
69+
app.engine('.html', render);
70+
app.set('view engine', '.html');
71+
app.locals.user = { name: 'tobi' };
72+
73+
app.render('user', function(err, str){
74+
if (err) return done(err);
75+
str.should.equal('<p>tobi</p>');
76+
done();
77+
})
78+
})
6479
})
6580
})

0 commit comments

Comments
 (0)