fix: string snapshots

This commit is contained in:
Gleb Bahmutov 2017-12-10 22:40:22 -05:00
parent 6af1b2cdcb
commit 515b5ba900

View file

@ -2,11 +2,7 @@ const sd = require('@wildpeaks/snapshot-dom')
const beautify = require('js-beautify').html
function isJqueryElement (x) {
// had to work around "switchcase" bug
function isObject (x) {
return x instanceof Object
}
return x && isObject(x) && 'wrap' in x
return x && typeof x !== 'string' && 'wrap' in x
}
// converts DOM element to a JSON object