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

hapi-csv

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-csv - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

5

lib/index.js

@@ -50,2 +50,7 @@ 'use strict';

//todo
if (request.response.isBoom) {
return reply.continue();
}
const acceptHeader = request.headers.accept;

@@ -52,0 +57,0 @@

2

package.json
{
"name": "hapi-csv",
"version": "2.3.1",
"version": "2.3.2",
"description": "Hapi plugin for converting a Joi response schema and dataset to csv",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -36,3 +36,3 @@ 'use strict';

describe('Basic convertions', () => {
describe('Basic conversions', () => {

@@ -78,2 +78,11 @@ let simpleServer;

}
}, {
method: 'GET',
path: '/error',
config: {
handler: function (request, reply) {
return reply(new Error());
}
}
}]);

@@ -215,5 +224,26 @@

});
it('Passes on errors', (done) => {
return simpleServer.inject({
method: 'GET',
url: '/error',
headers: {
Accept: 'text/csv'
}
}, (res) => {
expect(res.headers['content-type']).to.equal('application/json; charset=utf-8');
expect(res.result).to.equal({
statusCode: 500,
error: 'Internal Server Error',
message: 'An internal server error occurred'
});
return done();
});
});
});
describe('Advanced convertions', () => {
describe('Advanced conversions', () => {

@@ -220,0 +250,0 @@ it('Converts more advanced, nested schema', (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