mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-01-15 22:43:11 +00:00
16 lines
346 B
TypeScript
16 lines
346 B
TypeScript
import { fc, testProp } from 'ava-fast-check';
|
|
|
|
import { Message } from './waku_message';
|
|
|
|
testProp(
|
|
'Waku message round trip binary serialisation',
|
|
[fc.string()],
|
|
(t, s) => {
|
|
const msg = Message.fromString(s);
|
|
const binary = msg.toBinary();
|
|
const actual = Message.fromBinary(binary);
|
|
|
|
t.true(actual.isEqualTo(msg));
|
|
}
|
|
);
|