import { BarcodeFormat } from '@zxing/library' ; import { MultiFormatReader } from '@zxing/library' ; import AbstractBlackBoxSpec from '../common/AbstractBlackBox' ; import { TextDecoder , TextEncoder } from '@zxing/text-encoding' ; import { ZXingStringEncoding } from '@zxing/library' ; ZXingStringEncoding . customDecoder = ( b , e ) => new TextDecoder ( e ) . decode ( b ) ; ZXingStringEncoding . customEncoder = ( b , e ) => new TextEncoder ( e , { NONSTANDARD_allowLegacyEncoding : true } ) . encode ( b ) ; author Sean Owen
  export default class QRCodeBlackBox2Spec extends AbstractBlackBoxSpec { public constructor ( ) { super ( 'src/test/resources/blackbox/qrcode-2' , new MultiFormatReader ( ) , BarcodeFormat . QR_CODE ) ; this . addTest ( 31 , 31 , 0.0 ) ; this . addTest ( 29 , 29 , 90.0 ) ; this . addTest ( 30 , 30 , 180.0 ) ; this . addTest ( 29 , 29 , 270.0 ) ; } } describe ( 'QRCodeBlackBox.2' , ( ) => { it . skip ( 'testBlackBox' , async ( ) => { const test = new QRCodeBlackBox2Spec ( ) ; await test . testBlackBox ( ) ; } ) ; } ) ;