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

esi-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esi-server - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

4

package.json
{
"name": "esi-server",
"version": "2.0.0",
"version": "3.0.0",
"description": "Edge Side Includes (ESI) fragments server",

@@ -21,3 +21,3 @@ "scripts": {

"esi-server-data-koa-router": "^1.0.0",
"esi-server-template-nunjucks": "^1.0.0",
"esi-server-template-nunjucks": "^2.0.0",
"eslint": "^4.4.1",

@@ -24,0 +24,0 @@ "eslint-plugin-promise": "^3.5.0",

@@ -16,10 +16,7 @@ "use strict";

router.get("/articles/:id", ctx => {
return new Promise(resolve => {
resolve(
Object.assign({
title: "My article",
body: "My body"
}, {
id: ctx.params.id
}));
ctx.body = Object.assign({
title: "My article",
body: "My body"
}, {
id: ctx.params.id
});

@@ -45,10 +42,11 @@ });

beforeEach(() => {
templateProviderGetStub = new sinon.stub(
templateProvider, "get");
templateProviderGetStub.withArgs(
"article.html")
templateProviderGetStub = new sinon
.stub(templateProvider, "get");
templateProviderGetStub
.withArgs("article.html")
.returns({
render: (data) => {
return JSON.stringify(
data);
return Promise.resolve(
JSON.stringify(
data));
}

@@ -65,4 +63,6 @@ });

)
.expect("Content-Type",
"text/html; charset=utf-8");
.expect(
"Content-Type",
"text/html; charset=utf-8"
);
});

@@ -74,3 +74,4 @@ it("respond with parsed article", () => {

)
.expect(200,
.expect(
200,
"{\"title\":\"My article\",\"body\":\"My body\",\"id\":\"1\"}"

@@ -77,0 +78,0 @@ );

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