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 1.0.0 to 2.0.0

CHANGELOG.md

4

index.js

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

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

@@ -16,3 +16,3 @@ return;

host: 'www.library.ucsf.edu',
path: '/search/node/' + querystring.escape(query)
path: '/search/node/' + querystring.escape(query.searchTerm)
};

@@ -19,0 +19,0 @@

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

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

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

@@ -22,4 +22,11 @@ /*jshint expr: true*/

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

@@ -35,3 +42,3 @@ done();

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

@@ -47,3 +54,3 @@ done();

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

@@ -56,3 +63,3 @@ done();

nock.disableNetConnect();
drupal6.search('medicine', function (result) {
drupal6.search({searchTerm: 'medicine'}, function (result) {
nock.enableNetConnect();

@@ -59,0 +66,0 @@ expect(result.data).to.be.undefined;

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