194: Added basic support for 2of5 barcodes; fixed integration-tests
|
After Width: | Height: | Size: 174 KiB |
|
After Width: | Height: | Size: 178 KiB |
|
After Width: | Height: | Size: 171 KiB |
|
After Width: | Height: | Size: 162 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 168 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 183 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 147 KiB |
|
After Width: | Height: | Size: 187 KiB |
@@ -304,4 +304,41 @@ describe('decodeSingle', function () {
|
||||
});
|
||||
_runTestSet(testSet, config);
|
||||
});
|
||||
|
||||
describe("2of5", function() {
|
||||
var config = config = {
|
||||
inputStream: {
|
||||
size: 800,
|
||||
singleChannel: false
|
||||
},
|
||||
locator: {
|
||||
patchSize: "medium",
|
||||
halfSample: true
|
||||
},
|
||||
numOfWorkers: 0,
|
||||
decoder: {
|
||||
readers: ["2of5_reader"]
|
||||
},
|
||||
locate: true,
|
||||
src: null
|
||||
},
|
||||
testSet = [
|
||||
{"name": "image-001.jpg", "result": "9577149002"},
|
||||
{"name": "image-002.jpg", "result": "9577149002"},
|
||||
{"name": "image-003.jpg", "result": "5776158811"},
|
||||
{"name": "image-004.jpg", "result": "0463381455"},
|
||||
{"name": "image-005.jpg", "result": "3261594101"},
|
||||
{"name": "image-006.jpg", "result": "3261594101"},
|
||||
{"name": "image-007.jpg", "result": "3261594101"},
|
||||
{"name": "image-008.jpg", "result": "6730705801"},
|
||||
{"name": "image-009.jpg", "result": "5776158811"},
|
||||
{"name": "image-010.jpg", "result": "5776158811"}
|
||||
];
|
||||
|
||||
testSet.forEach(function(sample) {
|
||||
sample.format = "2of5";
|
||||
});
|
||||
|
||||
_runTestSet(testSet, config);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -153,21 +153,6 @@ describe("camera_access", () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it("should set deviceId if facingMode is set to environment", (done) => {
|
||||
setDevices([{deviceId: "front", kind: "videoinput", label: "front Facing"},
|
||||
{deviceId: "back", label: "back Facing", kind: "videoinput"}]);
|
||||
const givenConstraints = {width: 180, facingMode: "environment"};
|
||||
return pickConstraints(givenConstraints).then((actualConstraints) => {
|
||||
expect(actualConstraints.video).to.deep.equal({width: 180, deviceId: "back"});
|
||||
done();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
expect(err).to.equal(null);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||