message: add custom encoder to test suite
diff: @@ -36,6 +36,9 @@ import AztecWriter from '../../../../core/aztec/AztecWriter';
  import ResultPoint from '../../../../core/ResultPoint';
  import StringEncoding from '../../../../core/util/StringEncoding';
  import Charset from '../../../../core/util/Charset';
  +import { TextEncoder } from '@sinonjs/text-encoding';
  +
  +StringEncoding.customEncoder = (b, e) => new TextEncoder(e, { NONSTANDARD_allowLegacyEncoding: true }).encode(b);
  /**
  * Aztec 2D generator unit tests.
  @@ -564,7 +567,7 @@ describe('EncoderTest', () => {
  try {
  Encoder.encode(alphabet, 25, -1);
  - fail("Encode should have failed. Text can't fit in 1-layer compact");
  + fail('Encode should have failed. Text can\'t fit in 1-layer compact');
  } catch (expected) {
  // continue
  }
  @@ -584,7 +587,7 @@ describe('EncoderTest', () => {
  );
  try {
  Encoder.encode(data, 0, -4);
  - fail("Encode should have failed. Text can't fit in 1-layer compact");
  + fail('Encode should have failed. Text can\'t fit in 1-layer compact');
  } catch (expected) {
  // continue
  }
  @@ -776,8 +779,6 @@ describe('EncoderTest', () => {
  }
  function testHighLevelEncodeString(s: string, expectedBits: string | number) {
  - const jhu = StringUtils.getBytes(s, StandardCharsets.ISO_8859_1);
  -
  const bits: BitArray = new HighLevelEncoder(
  StringUtils.getBytes(s, StandardCharsets.ISO_8859_1)
  ).encode();
  