Fixed tests

This commit is contained in:
Christoph Oberhofer
2016-06-19 16:55:29 +02:00
parent ec8f4377c1
commit b9efb07456
6 changed files with 243 additions and 239 deletions
+1 -1
View File
@@ -10,7 +10,6 @@ import {createConfigFromSource} from './input/config_factory';
function fromSource(config, source, inputConfig = {}) {
config = createConfigFromSource(config, inputConfig, source);
console.log(config);
const scanner = createScanner();
return {
addEventListener(eventType, cb) {
@@ -36,6 +35,7 @@ function fromSource(config, source, inputConfig = {}) {
return this;
},
toPromise() {
// how to cancel?? timeout!
return new Promise((resolve, reject) => {
scanner.decodeSingle(config, (result) => {
if (result && result.codeResult && result.codeResult.code) {