Added scanning barcodes with a camera
This commit is contained in:
22
quagga2/quagga2-1.12.1/test/test-import.mjs
Normal file
22
quagga2/quagga2-1.12.1/test/test-import.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
import Q from '../lib/quagga.js';
|
||||
|
||||
describe('testing node import', () => {
|
||||
it('import works', () => {
|
||||
expect(Q).to.be.an('object');
|
||||
expect(Q.init).to.be.a('function');
|
||||
expect(Q.start).to.be.a('function');
|
||||
expect(Q.stop).to.be.a('function');
|
||||
});
|
||||
it('contains CameraAccess', () => {
|
||||
const { CameraAccess: CA } = Q;
|
||||
expect(CA).to.be.an('object').with.keys([
|
||||
'request', 'release', 'enumerateVideoDevices',
|
||||
'getActiveStream', 'getActiveStreamLabel', 'getActiveTrack', 'requestedVideoElement',
|
||||
'enableTorch', 'disableTorch',
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
// export default 1;
|
||||
Reference in New Issue
Block a user