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

@open-wc/chai-dom-equals

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-wc/chai-dom-equals - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

22

chai-dom-equals.js

@@ -82,5 +82,14 @@ import { getSemanticDomDiff } from '@open-wc/semantic-dom-diff';

const path = result ? result.path : '';
const normalizedHTML = result ? result.normalizedLeftHTML : '';
this.assert(
result === null,
`expected dom to be semantically equal\n- diff found: ${message}\n- in path: ${path}`,
() => {
/* eslint-disable no-console */
console.log('Snapshot changed, want to accept the change?');
console.log('Updated Snapshot:');
console.log('');
console.log(normalizedHTML);
/* eslint-enable no-console */
return `expected dom to be semantically equal\n- diff found: ${message}\n- in path: ${path}`;
},
'expected dom to not be semantically equal',

@@ -92,5 +101,14 @@ );

const path = result ? result.path : '';
const normalizedHTML = result ? result.normalizedLeftHTML : '';
this.assert(
result === null,
`expected shadow dom to be semantically equal\n- diff found: ${message}\n- in path: ${path}`,
() => {
/* eslint-disable no-console */
console.log('Snapshot changed, want to accept the change?');
console.log('Updated Snapshot:');
console.log('');
console.log(normalizedHTML);
/* eslint-enable no-console */
return `expected shadow dom to be semantically equal\n- diff found: ${message}\n- in path: ${path}`;
},
'expected shadow dom to not be semantically equal',

@@ -97,0 +115,0 @@ );

@@ -6,2 +6,13 @@ # Change Log

# [0.2.0](https://github.com/open-wc/open-wc/tree/master/packages/chai-dom-equals/compare/@open-wc/chai-dom-equals@0.1.1...@open-wc/chai-dom-equals@0.2.0) (2018-11-12)
### Features
* print snapshot to console on change ([db54729](https://github.com/open-wc/open-wc/tree/master/packages/chai-dom-equals/commit/db54729))
## [0.1.1](https://github.com/open-wc/open-wc/tree/master/packages/chai-dom-equals/compare/@open-wc/chai-dom-equals@0.1.0...@open-wc/chai-dom-equals@0.1.1) (2018-11-05)

@@ -8,0 +19,0 @@

6

package.json
{
"name": "@open-wc/chai-dom-equals",
"version": "0.1.1",
"version": "0.2.0",
"description": "Chai Plugin to compare dom and shadow dom trees. Part of open-wc recommendations",

@@ -17,3 +17,3 @@ "author": "open-wc",

"dependencies": {
"@open-wc/semantic-dom-diff": "^0.1.2"
"@open-wc/semantic-dom-diff": "^0.2.0"
},

@@ -30,3 +30,3 @@ "devDependencies": {

},
"gitHead": "fd4d41a55acc83e35293d060e41584ca8db06fe9"
"gitHead": "28284f645a13d0bb3ca64121eb19c5d2d479aed6"
}
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