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

protractor-nosync

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-nosync - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

index.js
var wrap = function (browser, method) {
return function () {
var result;
browser.ignoreSynchronization = true;
method.apply(method, arguments);
result = method.apply(method, arguments);
browser.ignoreSynchronization = false;
return result;
};

@@ -13,3 +15,3 @@ }

var noSync = function(method) {
wrap(browser, method)();
return wrap(browser, method)();
}

@@ -16,0 +18,0 @@

{
"name": "protractor-nosync",
"version": "1.0.1",
"version": "1.0.2",
"description": "A wrapper to execute arbitrary methods under protractor without browser synchronization.",

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

@@ -10,3 +10,4 @@ var chai = require("chai");

describe('Protractor-NoSync Wrapped Object Method', function () {
var browser, obj, nosync, arg1, arg2;
var browser, obj, nosync, arg1, arg2, result;
var data = { value: 42 };

@@ -19,3 +20,3 @@ before(function () {

obj = {
spy: sinon.spy()
spy: sinon.stub().returns(data)
};

@@ -36,3 +37,3 @@

nosync.spy(arg1, arg2);
result = nosync.spy(arg1, arg2);
});

@@ -58,6 +59,11 @@

});
it('should properly return results of the method.', function () {
expect(result).to.equal(data);
});
});
describe('Protractor-NoSync Wrapped Code Block', function () {
var browser, obj, nosync, arg1, arg2, spy;
var browser, obj, nosync, arg1, arg2, spy, result;
var data = { value: 42 };

@@ -69,3 +75,3 @@ before(function () {

// Set up test fixtures.
spy = sinon.spy();
spy = sinon.stub().returns(data);

@@ -85,4 +91,4 @@ // Setup protractor browser mock. Sinon does not directly support getters and setters so work around that.

nosync(function () {
spy(arg1, arg2);
result = nosync(function () {
return spy(arg1, arg2);
});

@@ -109,2 +115,6 @@ });

});
it('should properly return results of the block.', function () {
expect(result).to.equal(data);
});
});
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