Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('LightDom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
// @ts-ignore
} else if (utils.flag(this, 'dom')) {
const expectedHTML = getDiffableHTML(value, args[0]);
// @ts-ignore
const actualHTML = getDiffableHTML(getOuterHtml(this._obj), args[0]);
// use chai's built-in string comparison, log the updated snapshot on error
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('Dom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
} else {
// @ts-ignore
_super.apply(this, [value, ...args]);
const domEquals = _super => function handleDom(value, ...args) {
// @ts-ignore
if (utils.flag(this, 'shadowDom')) {
const expectedHTML = getDiffableHTML(value, args[0]);
// @ts-ignore
const actualHTML = getDiffableHTML(getCleanedShadowDom(this._obj), args[0]);
// use chai's built-in string comparison, log the updated snapshot on error
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('ShadowDom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
// @ts-ignore
const domEquals = _super => function handleDom(value, ...args) {
// @ts-ignore
if (utils.flag(this, 'shadowDom')) {
const expectedHTML = getDiffableHTML(value, args[0]);
// @ts-ignore
const actualHTML = getDiffableHTML(getCleanedShadowDom(this._obj), args[0]);
// use chai's built-in string comparison, log the updated snapshot on error
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('ShadowDom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
// @ts-ignore
} else if (utils.flag(this, 'lightDom')) {
const expectedHTML = getDiffableHTML(value, args[0]);
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('ShadowDom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
// @ts-ignore
} else if (utils.flag(this, 'lightDom')) {
const expectedHTML = getDiffableHTML(value, args[0]);
// @ts-ignore
const actualHTML = getDiffableHTML(this._obj.innerHTML, args[0]);
// use chai's built-in string comparison, log the updated snapshot on error
try {
new chai.Assertion(actualHTML).to.equal(expectedHTML);
} catch (error) {
/* eslint-disable no-console */
console.log('LightDom Snapshot changed, want to accept the change:');
console.log('');
console.log(actualHTML);
/* eslint-enable no-console */
throw error;
}
// @ts-ignore
} else if (utils.flag(this, 'dom')) {
const expectedHTML = getDiffableHTML(value, args[0]);