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

@ -5,6 +5,7 @@
import { assert } from 'chai';
import { v4 as getGuid } from 'uuid';
import Long from 'long';
import MessageReceiver from '../textsecure/MessageReceiver';
import { IncomingWebSocketRequest } from '../textsecure/WebsocketResources';
@ -48,14 +49,14 @@ describe('MessageReceiver', () => {
source: number,
sourceUuid: uuid,
sourceDevice: deviceId,
timestamp: Date.now(),
timestamp: Long.fromNumber(Date.now()),
content: Crypto.getRandomBytes(200),
}).finish();
messageReceiver.handleRequest(
new IncomingWebSocketRequest(
{
id: 1,
id: Long.fromNumber(1),
verb: 'PUT',
path: '/api/v1/message',
body,