Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-partials

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-partials - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test/fixtures/locals.ejs

4

index.js

@@ -210,2 +210,6 @@ var ejs = require('ejs')

// merge app locals into
for(var k in this.app.locals)
options[k] = options[k] || this.app.locals[k];
// extract object name from view

@@ -212,0 +216,0 @@ name = options.as || resolveObjectName(view);

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Express 3.x Layout & Partial support.",
"version": "0.0.1",
"version": "0.0.2",
"repository": {

@@ -8,0 +8,0 @@ "url": "https://github.com/publicclass/express-partials"

@@ -9,2 +9,6 @@ var express = require('express')

app.locals.use(function(req,res){
app.locals.hello = 'there';
})
app.get('/',function(req,res,next){

@@ -18,2 +22,10 @@ res.render('index.ejs')

app.get('/res-locals',function(req,res,next){
res.render('locals.ejs',{hello:'here'})
})
app.get('/app-locals',function(req,res,next){
res.render('locals.ejs')
})
app.get('/mobile',function(req,res,next){

@@ -60,2 +72,26 @@ res.render('index.ejs',{layout:'mobile'})

describe('GET /res-locals',function(){
it('should render "here"',function(done){
request(app)
.get('/res-locals')
.end(function(res){
res.should.have.status(200);
res.body.should.equal('<html><head><title>express-partials</title></head><body><h1>here</h1></body></html>');
done();
})
})
})
describe('GET /app-locals',function(){
it('should render "there"',function(done){
request(app)
.get('/app-locals')
.end(function(res){
res.should.have.status(200);
res.body.should.equal('<html><head><title>express-partials</title></head><body><h1>there</h1></body></html>');
done();
})
})
})
describe('GET /mobile',function(){

@@ -62,0 +98,0 @@ it('should render with mobile.ejs as layout',function(done){

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc