import * as assert from 'assert' ; import { QRCodeDecoderErrorCorrectionLevel } from '@zxing/library' ; author Sean Owen
  describe ( 'QRCodeDecoderErrorCorrectionLevel' , ( ) => { it ( 'testForBits' , ( ) => { assert . strictEqual ( QRCodeDecoderErrorCorrectionLevel . M . equals ( QRCodeDecoderErrorCorrectionLevel . forBits ( 0 ) ) , true ) ; assert . strictEqual ( QRCodeDecoderErrorCorrectionLevel . L . equals ( QRCodeDecoderErrorCorrectionLevel . forBits ( 1 ) ) , true ) ; assert . strictEqual ( QRCodeDecoderErrorCorrectionLevel . H . equals ( QRCodeDecoderErrorCorrectionLevel . forBits ( 2 ) ) , true ) ; assert . strictEqual ( QRCodeDecoderErrorCorrectionLevel . Q . equals ( QRCodeDecoderErrorCorrectionLevel . forBits ( 3 ) ) , true ) ; try { QRCodeDecoderErrorCorrectionLevel . forBits ( 4 ) ; assert . ok ( false , 'Should have thrown an exception' ) ; } catch ( ex ) { } } ) ; } ) ;