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

browser-monkey

Package Overview
Dependencies
Maintainers
2
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.19.0 to 1.20.0

8

index.js

@@ -146,2 +146,6 @@ var retry = require('trytryagain');

function getNormalisedText(el) {
return el[0].innerText.replace(/ +/g,' ').replace(/ *\n */g,"\n");
}
return {

@@ -158,7 +162,7 @@ find: function(element) {

if (text !== undefined) {
assertElementProperties(els, text, function (e) { return e.text(); });
assertElementProperties(els, text, function (e) { return getNormalisedText(e); });
}
if (exactText !== undefined) {
assertElementProperties(els, exactText, function (e) { return e.text(); }, true);
assertElementProperties(els, exactText, function (e) { return getNormalisedText(e); }, true);
}

@@ -165,0 +169,0 @@

{
"name": "browser-monkey",
"version": "1.19.0",
"version": "1.20.0",
"description": "reliable dom testing",

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

@@ -440,2 +440,16 @@ require('lie/polyfill');

it('eventually finds an element containing text as it appears on the page', function () {
var promise = browser.find('.element', {text: 'This is some text that is all on one line.\nAnd some more on another line'}).shouldExist();
eventuallyInsertHtml('<div class="element"><div>\
This\
is\
some\
text\
that is all on one line.\
<br/>\
And some more on another line.\
</div></div>');
return promise;
});
it('eventually finds an element containing exactText', function () {

@@ -442,0 +456,0 @@ var good = browser.find('.a', {exactText: '8'}).shouldExist();

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