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

amalgamatic-drupal6

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amalgamatic-drupal6 - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

13

CHANGELOG.md

@@ -0,1 +1,14 @@

# 2014-09-26
4 commits against 2 issues, over 4 days [`90bfd47`](https://github.com/ucsf-ckm/amalgamatic-drupal6/commit/90bfd47)⎆[`f3b4a21`](https://github.com/ucsf-ckm/amalgamatic-drupal6/commit/f3b4a21)
## [**3.0.0**](https://github.com/ucsf-ckm/amalgamatic-drupal6/issues?milestone=2&state=closed)
- [**#4**](https://github.com/ucsf-ckm/amalgamatic-drupal6/issues/4) Callback first parameter should be error
## Issues
- [**#5**](https://github.com/ucsf-ckm/amalgamatic-drupal6/issues/5) Callback first parameter should be error object, fixes #4
---
# 2014-09-22

@@ -2,0 +15,0 @@ 5 commits against 1 issues, over 2 days [`2454f2d`](https://github.com/ucsf-ckm/amalgamatic-drupal6/commit/2454f2d)⎆[`1fbcc93`](https://github.com/ucsf-ckm/amalgamatic-drupal6/commit/1fbcc93)

6

index.js

@@ -9,3 +9,3 @@ var querystring = require('querystring');

if (! query || ! query.searchTerm) {
callback({data: []});
callback(null, {data: []});
return;

@@ -40,7 +40,7 @@ }

callback({data: result});
callback(null, {data: result});
});
}).on('error', function (e) {
callback({error: e.message});
callback(e);
});
};

@@ -8,3 +8,3 @@ {

},
"version": "2.0.0",
"version": "3.0.0",
"dependencies": {

@@ -11,0 +11,0 @@ "cheerio": "^0.17.0"

@@ -23,3 +23,4 @@ /*jshint expr: true*/

it('returns an empty result if no query object provided', function (done) {
drupal6.search(null, function (result) {
drupal6.search(null, function (err, result) {
expect(err).to.be.not.ok;
expect(result).to.deep.equal({data:[]});

@@ -31,3 +32,4 @@ done();

it('returns an empty result if no search term provided', function (done) {
drupal6.search({searchTerm: ''}, function (result) {
drupal6.search({searchTerm: ''}, function (err, result) {
expect(err).to.be.not.ok;
expect(result).to.deep.equal({data:[]});

@@ -43,3 +45,4 @@ done();

drupal6.search({searchTerm: 'medicine'}, function (result) {
drupal6.search({searchTerm: 'medicine'}, function (err, result) {
expect(err).to.be.not.ok;
expect(result.data.length).to.equal(2);

@@ -55,3 +58,4 @@ done();

drupal6.search({searchTerm: 'fhqwhgads'}, function (result) {
drupal6.search({searchTerm: 'fhqwhgads'}, function (err, result) {
expect(err).to.be.not.ok;
expect(result.data.length).to.equal(0);

@@ -64,6 +68,6 @@ done();

nock.disableNetConnect();
drupal6.search({searchTerm: 'medicine'}, function (result) {
drupal6.search({searchTerm: 'medicine'}, function (err, result) {
nock.enableNetConnect();
expect(result.data).to.be.undefined;
expect(result.error).to.equal('Nock: Not allow net connect for "www.library.ucsf.edu:80"');
expect(result).to.be.not.ok;
expect(err.message).to.equal('Nock: Not allow net connect for "www.library.ucsf.edu:80"');
done();

@@ -70,0 +74,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