Comparing version 2.0.0 to 3.0.0
{ | ||
"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 @@ ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19562
18
409
1