diff --git a/src/__tests__/readers/ean-13.reader.spec.ts b/src/__tests__/readers/ean-13.reader.spec.ts index b49ff3d..77f8b91 100644 --- a/src/__tests__/readers/ean-13.reader.spec.ts +++ b/src/__tests__/readers/ean-13.reader.spec.ts @@ -12,16 +12,16 @@ describe('Ean13Reader', () => { describe('validate', () => { test('should validate value length', () => { /* tslint:disable */ - expect(classUnderTest['validate'](']E41111111111111')).toBe(true); - expect(classUnderTest['validate'](']E411111111111111')).toBe(false); - expect(classUnderTest['validate'](']E411111')).toBe(false); + expect(classUnderTest['validate'](']E01111111111111')).toBe(true); + expect(classUnderTest['validate'](']E011111111111111')).toBe(false); + expect(classUnderTest['validate'](']E011111')).toBe(false); /* tslint:enable */ }); test('should validate character type', () => { /* tslint:disable */ - expect(classUnderTest['validate'](']E41111111111111')).toBe(true); - expect(classUnderTest['validate'](']E4aaaaaaaaaaaaa')).toBe(false); + expect(classUnderTest['validate'](']E01111111111111')).toBe(true); + expect(classUnderTest['validate'](']E0aaaaaaaaaaaaa')).toBe(false); /* tslint:enable */ }); }); diff --git a/src/readers/index.ts b/src/readers/index.ts index bba5f9e..2a88edf 100644 --- a/src/readers/index.ts +++ b/src/readers/index.ts @@ -10,40 +10,44 @@ import { Itf13Reader } from './itf-13.reader'; import { Itf14Reader } from './itf-14.reader'; import { Code128Reader } from './code-128.reader'; import { Ean13Reader } from './ean-13.reader'; +import { Ean8Reader } from './ean-8.reader'; export { Code39Reader, Code128Reader, + Ean8Reader, Ean13Reader, Gtin8Reader, Gtin12Reader, Gtin13Reader, Gtin14Reader, + GS1Reader, Itf8Reader, Itf12Reader, Itf13Reader, Itf14Reader, - GS1Reader, }; export const READERS = [ Code39Reader, Code128Reader, + Ean8Reader, Ean13Reader, Gtin8Reader, Gtin12Reader, Gtin13Reader, Gtin14Reader, + GS1Reader, Itf8Reader, Itf12Reader, Itf13Reader, Itf14Reader, - GS1Reader, ]; export const READER_TYPES = { code_39: Code39Reader, code_128: Code128Reader, + ean_8: Ean8Reader, ean_13: Ean13Reader, gs1_128: GS1Reader, gtin_12: Gtin12Reader,