New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chai-sync-layer-suite

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-sync-layer-suite - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

README.md

7

package.json
{
"name": "chai-sync-layer-suite",
"description": "Chai suite for sync-layer library",
"version": "0.2.0",
"version": "0.3.0",
"repository": {

@@ -11,3 +11,5 @@ "type": "git",

"license": "MIT",
"dependencies": {},
"dependencies": {
"rewire-test-helpers": "^1.0.0-rc1"
},
"devDependencies": {

@@ -18,3 +20,2 @@ "chai": "^1.10.0",

"rewire": "^2.1.3",
"rewire-test-helpers": "^0.1.0",
"sinon": "^1.12.1",

@@ -21,0 +22,0 @@ "sinon-chai": "^2.6.0"

@@ -103,9 +103,3 @@ var describeSync = rewire('../describe_sync');

});
it('throw descriptive error if sync is required without rewire', function() {
expect(function() {
describeSync('obj', {})
}).to.throw("Module must be required via rewire (e.g `var answer = require('get-answer');`)")
});
});

@@ -0,1 +1,3 @@

var RewireTestHelpers = require('rewire-test-helpers')
var _global;

@@ -21,6 +23,2 @@ if (typeof global != 'undefined') {

var describeSync = function(subjectName, subject, bodyFn) {
if (!subject.__set__) {
throw "Module must be required via rewire (e.g `var answer = require('get-answer');`)"
}
describe(subjectName, function() {

@@ -38,4 +36,4 @@ beforeEach(function() {

};
this.__originalRequests = subject.__get__('requests')
subject.__set__('requests', requests);
this.__restoreRequests =
RewireTestHelpers.injectDependencies(subject, {requests: requests})

@@ -68,4 +66,4 @@ this.__syncRestoreFns = Object.keys(subject).reduce(function(acc, key) {

if (this.__originalRequests) {
subject.__set__('requests', this.__originalRequests);
if (typeof this.__restoreRequests === 'function') {
this.__restoreRequests()
}

@@ -81,2 +79,1 @@ });

module.exports = describeSync;
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