Use --force-long with pbjs

This commit is contained in:
Fedor Indutny 2022-03-23 13:49:27 -07:00 committed by GitHub
parent bb066d4a84
commit 2eaacac151
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 99 additions and 131 deletions

View file

@ -1,21 +0,0 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import Long from 'long';
import { normalizeNumber } from '../../util/normalizeNumber';
describe('normalizeNumber', () => {
it('returns undefined when input is undefined', () => {
assert.isUndefined(normalizeNumber(undefined));
});
it('returns number when input is number', () => {
assert.strictEqual(normalizeNumber(123), 123);
});
it('returns number when input is Long', () => {
assert.strictEqual(normalizeNumber(new Long(123)), 123);
});
});