1 import isArrayOfUint8Array from './isArrayOfUint8Array';
3 describe('isArrayOfUint8Array()', () => {
4 it('returns true if array is empty', () => {
5 const result = isArrayOfUint8Array([]);
7 expect(result).toBe(true);
10 it('returns true if every item is an instance of Uint8Array', () => {
11 const result = isArrayOfUint8Array([new Uint8Array(1), new Uint8Array(2), new Uint8Array(3)]);
13 expect(result).toBe(true);
16 it('returns false if any item is not an instance of Uint8Array', () => {
17 const result = isArrayOfUint8Array([new Uint8Array(1), 'not instance of Uint8Array', new Uint8Array(3)]);
19 expect(result).toBe(false);