Fully move to protobufjs
This commit is contained in:
parent
20ea409d9e
commit
570fb182d4
46 changed files with 1133 additions and 12401 deletions
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { isByteBufferEmpty } from '../../util/isByteBufferEmpty';
|
||||
|
||||
describe('isByteBufferEmpty', () => {
|
||||
it('returns true for undefined', () => {
|
||||
assert.isTrue(isByteBufferEmpty(undefined));
|
||||
});
|
||||
|
||||
it('returns true for object missing limit', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const brokenByteBuffer: any = {};
|
||||
|
||||
assert.isTrue(isByteBufferEmpty(brokenByteBuffer));
|
||||
});
|
||||
|
||||
it('returns true for object limit', () => {
|
||||
const emptyByteBuffer = new window.dcodeIO.ByteBuffer(0);
|
||||
|
||||
assert.isTrue(isByteBufferEmpty(emptyByteBuffer));
|
||||
});
|
||||
|
||||
it('returns false for object limit', () => {
|
||||
const byteBuffer = window.dcodeIO.ByteBuffer.wrap('AABBCC', 'hex');
|
||||
|
||||
assert.isFalse(isByteBufferEmpty(byteBuffer));
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue