@open-wc/chai-dom-equals
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -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 @@ |
{ | ||
"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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116
9018
6
+ Added@open-wc/semantic-dom-diff@0.2.0(transitive)
- Removed@open-wc/semantic-dom-diff@0.1.2(transitive)