Fixed tests

This commit is contained in:
Christoph Oberhofer
2017-03-12 21:31:40 +01:00
parent 1d470660a7
commit 14684bb58d
6 changed files with 67 additions and 91 deletions
+2 -3
View File
@@ -12,10 +12,9 @@ const windowObjects = [
];
const DOMHelper = windowObjects.reduce((result, obj) => {
return {
...result,
return Object.assign({}, result, {
[obj]: obj in windowRef ? windowRef[obj] : () => {}
};
});
}, {});
DOMHelper.setObject = (key, value) => {
+2 -3
View File
@@ -324,15 +324,14 @@ EANReader.prototype._decode = function() {
}
}
return {
return Object.assign({
code: result.join(""),
start: startInfo.start,
end: code.end,
codeset: "",
startInfo: startInfo,
decodedCodes: decodedCodes,
...resultInfo
};
}, resultInfo);
};
EANReader.prototype._decodeExtensions = function(offset) {
+3 -7
View File
@@ -345,13 +345,9 @@ function createScanner() {
}
function configForWorker(config) {
return {
...config,
inputStream: {
...config.inputStream,
target: null
}
};
return Object.assign({}, config, {
inputStream: Object.assign({}, config.inputStream, {target: null})
});
}
function workerInterface(factory) {