Move to protobufjs in ts/groups.ts

This commit is contained in:
Fedor Indutny 2021-06-22 07:46:42 -07:00 committed by GitHub
parent 972a4cba0c
commit 9f0c630574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1424 additions and 964 deletions

View file

@ -0,0 +1,19 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { dropNull } from '../../util/dropNull';
describe('dropNull', () => {
it('swaps null with undefined', () => {
assert.strictEqual(dropNull(null), undefined);
});
it('leaves undefined be', () => {
assert.strictEqual(dropNull(undefined), undefined);
});
it('non-null values undefined be', () => {
assert.strictEqual(dropNull('test'), 'test');
});
});