mirror of
https://github.com/logos-messaging/logos-delivery-js.git
synced 2026-03-09 19:23:18 +00:00
16 lines
372 B
TypeScript
16 lines
372 B
TypeScript
import { fc, testProp } from 'jest-fast-check';
|
|
|
|
import { Message } from './waku_message';
|
|
|
|
testProp(
|
|
'Waku message round trip binary serialization',
|
|
[fc.fullUnicodeString()],
|
|
(s) => {
|
|
const msg = Message.fromUtf8String(s);
|
|
const binary = msg.toBinary();
|
|
const actual = Message.fromBinary(binary);
|
|
|
|
expect(actual.isEqualTo(msg)).toBeTruthy();
|
|
}
|
|
);
|