"use strict";

var _ = require(".");

// Copyright 2017-2020 @polkadot/util authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
describe('u8aConcat', () => {
  it('concatenates arrays', () => {
    expect((0, _.u8aConcat)(new Uint8Array([1, 2, 3, 4]), new Uint8Array([5, 6]), new Uint8Array([7, 8, 9]))).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9]));
  });
  it('concatenates arrays & hex values', () => {
    expect((0, _.u8aConcat)(new Uint8Array([1, 2, 3, 4]), '0x0506', '0x070809')).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9]));
  });
});