app.render.js — express Source File
Architecture documentation for app.render.js, a javascript file in the express codebase.
Entity Profile
Relationship Graph
Source Code
'use strict'
var assert = require('node:assert')
var express = require('..');
var path = require('node:path')
var tmpl = require('./support/tmpl');
describe('app', function(){
describe('.render(name, fn)', function(){
it('should support absolute paths', function(done){
var app = createApp();
app.locals.user = { name: 'tobi' };
app.render(path.join(__dirname, 'fixtures', 'user.tmpl'), function (err, str) {
if (err) return done(err);
assert.strictEqual(str, '<p>tobi</p>')
done();
})
})
it('should support absolute paths with "view engine"', function(done){
var app = createApp();
app.set('view engine', 'tmpl');
app.locals.user = { name: 'tobi' };
app.render(path.join(__dirname, 'fixtures', 'user'), function (err, str) {
if (err) return done(err);
assert.strictEqual(str, '<p>tobi</p>')
done();
})
})
it('should expose app.locals', function(done){
var app = createApp();
app.set('views', path.join(__dirname, 'fixtures'))
app.locals.user = { name: 'tobi' };
app.render('user.tmpl', function (err, str) {
if (err) return done(err);
assert.strictEqual(str, '<p>tobi</p>')
done();
})
})
it('should support index.<engine>', function(done){
var app = createApp();
app.set('views', path.join(__dirname, 'fixtures'))
app.set('view engine', 'tmpl');
app.render('blog/post', function (err, str) {
if (err) return done(err);
assert.strictEqual(str, '<h1>blog post</h1>')
done();
})
})
// ... (333 more lines)
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does app.render.js do?
app.render.js is a source file in the express codebase, written in javascript. It belongs to the ExpressCore domain, ApplicationInit subdomain.
What functions are defined in app.render.js?
app.render.js defines 1 function(s): createApp.
Where is app.render.js in the architecture?
app.render.js is located at test/app.render.js (domain: ExpressCore, subdomain: ApplicationInit, directory: test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free