Socket
Socket
Sign inDemoInstall

@open-wc/testing

Package Overview
Dependencies
Maintainers
3
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-wc/testing - npm Package Compare versions

Comparing version 3.1.4 to 3.1.5

6

CHANGELOG.md
# Change Log
## 3.1.5
### Patch Changes
- ae9fe3e7: upgrade to chai-dom v1.11.0
## 3.1.4

@@ -4,0 +10,0 @@

4

package.json
{
"name": "@open-wc/testing",
"version": "3.1.4",
"version": "3.1.5",
"publishConfig": {

@@ -44,3 +44,3 @@ "access": "public"

"@types/chai": "^4.2.11",
"@types/chai-dom": "^0.0.9",
"@types/chai-dom": "^0.0.12",
"@types/sinon-chai": "^3.2.3",

@@ -47,0 +47,0 @@ "chai-a11y-axe": "^1.3.2"

@@ -88,2 +88,12 @@ function createCommonjsModule(fn) {

var el = flag(this, 'object');
if (className instanceof RegExp) {
return this.assert(
Array.from(el.classList).some(function(cls) { return className.test(cls) })
, 'expected ' + elToString(el) + ' to have class matching #{exp}'
, 'expected ' + elToString(el) + ' not to have class matching #{exp}'
, className
)
}
this.assert(

@@ -387,3 +397,3 @@ el.classList.contains(className)

style = window.getComputedStyle(el),
actual = style[styleProp];
actual = style.getPropertyValue(styleProp).trim();

@@ -397,2 +407,32 @@ this.assert(

});
chai.Assertion.overwriteProperty('focus', function() {
return function () {
var el = flag(this, 'object'), actual = el.ownerDocument.activeElement;
this.assert(
el === el.ownerDocument.activeElement
, 'expected #{this} to have focus'
, 'expected #{this} not to have focus'
, el
, actual
);
}
});
chai.Assertion.overwriteProperty('checked', function() {
return function () {
var el = flag(this, 'object');
if(!(el instanceof HTMLInputElement && (el.type === 'checkbox' || el.type === 'radio'))) {
throw new TypeError(elToString(el) + ' is not a checkbox or radio input');
}
this.assert(
el.checked
, 'expected ' + elToString(el) + ' to be checked'
, 'expected ' + elToString(el) + ' to not be checked');
}
});
}));

@@ -399,0 +439,0 @@ });

@@ -13,3 +13,3 @@ # Testing >> Testing Package ||10

Exposes all functions of [@open-wc/testing-helpers](https://github.com/open-wc/open-wc/blob/35894ab35ee97790087d9a413e23bfd2b9517bef/docs/docs/testing/helpers.md), so that you have a single package to import from:
Exposes all functions of [@open-wc/testing-helpers](https://github.com/open-wc/open-wc/blob/2bbdef9cc7d8def68e1bf6d60fd41b6bd987542b/docs/docs/testing/helpers.md), so that you have a single package to import from:

@@ -16,0 +16,0 @@ ```javascript

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