corrupt.js 304 B

12345678910
  1. var test = require('tape')
  2. var b64 = require('../')
  3. test('padding bytes found inside base64 string', function (t) {
  4. // See https://github.com/beatgammit/base64-js/issues/42
  5. var str = 'SQ==QU0='
  6. t.deepEqual(b64.toByteArray(str), new Uint8Array([73]))
  7. t.equal(b64.byteLength(str), 1)
  8. t.end()
  9. })