spec: fix final node and chromium specs after assert change

This commit is contained in:
Samuel Attard 2018-09-14 18:32:17 +10:00
parent 91f00a518a
commit 40f0f049a2
No known key found for this signature in database
GPG key ID: E89DDE5742D58C4E
3 changed files with 18 additions and 6 deletions

View file

@ -1,5 +1,16 @@
function resolveSingleObjectGetters (object) {
if (object && typeof object === 'object') {
const newObject = {}
for (const key in object) {
newObject[key] = resolveGetters(object[key])[0]
}
return newObject
}
return object
}
function resolveGetters (...args) {
return args.map(o => JSON.parse(JSON.stringify(o)))
return args.map(resolveSingleObjectGetters)
}
module.exports = {