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

halfpenny

Package Overview
Dependencies
Maintainers
7
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

halfpenny - npm Package Compare versions

Comparing version 7.0.2 to 7.0.3

6

lib/halfpenny.js

@@ -297,3 +297,7 @@ 'use strict';

token: data.token,
});
})
.then((response) => {
this.setCredentials(response.data.data[0]);
return response;
});
}

@@ -300,0 +304,0 @@

2

package.json

@@ -57,3 +57,3 @@ {

},
"version": "7.0.2"
"version": "7.0.3"
}

@@ -498,2 +498,3 @@ 'use strict';

const config = getValidConfig();
const credentials = {};
const hp = new Halfpenny(config);

@@ -504,7 +505,17 @@ const newPassword = 'the-freshest-new-password';

const spy = sinon.spy(hp, 'setCredentials');
const stub = sinon.stub(hp, 'doRequest');
// TODO: Investigate if `restore()` is actually necessary
const teardown = () => {
spy.restore();
stub.restore();
};
stub.returns(Promise.resolve());
stub.returns(Promise.resolve({
data: {
data: [credentials],
},
}));
t.plan(2);
t.plan(3);

@@ -536,5 +547,10 @@ hp.resetPassword({

);
t.equal(
spy.firstCall.args[0],
credentials,
'saves authentication credentials'
);
})
.catch(t.end)
.then(stub.restore, stub.restore);
.then(teardown, teardown);
});

@@ -541,0 +557,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