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

browser-monkey

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-monkey - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

4

index.js

@@ -234,6 +234,4 @@ var retry = require('trytryagain');

var self = this;
var interval = options && options.hasOwnProperty('interval') && options.interval !== undefined? options.interval: undefined;
var duration = options && options.hasOwnProperty('duration') && options.duration !== undefined? options.duration: 100;
return retry.ensuring({interval: interval, duration: duration}, function() {
return retry(options, function() {
var found = false;

@@ -240,0 +238,0 @@ try {

{
"name": "browser-monkey",
"version": "1.5.1",
"version": "1.6.0",
"description": "reliable dom testing",

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

@@ -202,3 +202,3 @@ # browser monkey

Wait a while for to be sure the element doesn't exist.
Waits for the element not to exist.

@@ -209,6 +209,6 @@ ```js

* `options.duration` - the duration to wait (100ms)
* `options.timeout` - length of time to wait for the element (1000ms)
* `options.interval` - time between testing the dom (10ms)
Returns a promise that resolves when the element doesn't exist, or is rejected if the timeout expires.
Returns a promise that resolves when the element no longer exists, or is rejected if the timeout expires.

@@ -215,0 +215,0 @@ ## shouldHave

@@ -32,8 +32,13 @@ var browser = require('..');

describe('shouldNotExist', function () {
it('should ensure that element never exists', function () {
var good = browser.find('.not-element').shouldNotExist();
var bad = browser.find('.element').shouldNotExist();
it("should ensure that element eventually doesn't exists", function () {
var elementToRemove = $('<div class="removing"></div>').appendTo(div);
var elementToStay = $('<div class="staying"></div>').appendTo(div);
eventuallyInsertHtml('<div class="element"></div>');
var good = browser.find('.removing').shouldNotExist();
var bad = browser.find('.staying').shouldNotExist();
setTimeout(function () {
elementToRemove.remove();
}, 50);
return Promise.all([

@@ -40,0 +45,0 @@ good,

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