diff --git a/src/core/oned/CodaBarReader.ts b/src/core/oned/CodaBarReader.ts index 0486eaa3..2f065a31 100644 --- a/src/core/oned/CodaBarReader.ts +++ b/src/core/oned/CodaBarReader.ts @@ -50,8 +50,8 @@ export default class CodaBarReader extends OneDReader { wnwnwnn: '.', nnwwwww: '+', nnwwnwn: 'A', - nnnwnww: 'B', - nwnwnnw: 'C', + nwnwnnw: 'B', + nnnwnww: 'C', nnnwwwn: 'D' }; diff --git a/src/index.ts b/src/index.ts index 47b90894..38ebd7bd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -122,3 +122,4 @@ export { default as RSSExpandedReader } from './core/oned/rss/expanded/RSSExpand export { default as AbstractExpandedDecoder } from './core/oned/rss/expanded/decoders/AbstractExpandedDecoder'; export { createDecoder as createAbstractExpandedDecoder } from './core/oned/rss/expanded/decoders/AbstractExpandedDecoderComplement'; export { default as MultiFormatOneDReader } from './core/oned/MultiFormatOneDReader'; +export { default as CodaBarReader } from './core/oned/CodaBarReader'; diff --git a/src/test/core/oned/CodaBarBlackBox1.spec.ts b/src/test/core/oned/CodaBarBlackBox1.spec.ts index 932f6d30..49aef8cf 100644 --- a/src/test/core/oned/CodaBarBlackBox1.spec.ts +++ b/src/test/core/oned/CodaBarBlackBox1.spec.ts @@ -17,24 +17,23 @@ // package com.google.zxing.oned; -import BarcodeFormat from '../../../core/BarcodeFormat'; -import MultiFormatReader from '../../../core/MultiFormatReader'; -import AbstractBlackBoxSpec from '../common/AbstractBlackBox'; +import { BarcodeFormat, CodaBarReader } from '@zxing/library'; +import AbstractBlackBoxSpec from './../common/AbstractBlackBox'; /** * @author Evan @dodobelieve */ class CodaBarBlackBox1Spec extends AbstractBlackBoxSpec { public constructor() { - super('src/test/resources/blackbox/codabar-1', new MultiFormatReader(), BarcodeFormat.CODABAR); + super('src/test/resources/blackbox/codabar-1', new CodaBarReader(), BarcodeFormat.CODABAR); this.addTest(6, 6, 0.0); this.addTest(6, 6, 180.0); } } describe('CodaBarBlackBox.1', () => { - it('testBlackBox', done => { - const test = new CodaBarBlackBox1Spec(); - return test.testBlackBox(done); - }); + it('testBlackBox', async () => { + const test = new CodaBarBlackBox1Spec(); + await test.testBlackBox(); + }); });