mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-05 15:23:12 +00:00
* fix: use pubsubTopic from current ones if not set * fix: improve type on dial method * enforce same pubusb on filter.subscribe, make content topic to pubsub mapping default for decoder / encoder * fix mapping problem * update tests * add error handling * fix typo * up lock * rm lock * up lock * remove only * fix content topic * fix ephemeral test * fix filter unsubscribe test * up utils * fix subscribe test * up interfaces and filter api * remove only * up ping test * fix subscribe test * fix push test * fix lightPush * fix multiple pubsub * remove only, fix subscribe filter test * remove only * fix cluster ID selection and named sharding subscription test * fix unsubscribe test * fix light push test * fix light push test * fix push test * fix relay publish * create runNode and fix relay tests * generalize runNodes, fix some tests * fix store tests * fix toAsyncIterator tests * remove only * fix lightPush * use generics * try fix test * run failing tests * remove only * address failed tests, remove DefaultPubsubTopic dependency in some tests
27 lines
827 B
TypeScript
27 lines
827 B
TypeScript
import { createEncoder } from "@waku/core";
|
|
import { utf8ToBytes } from "@waku/sdk";
|
|
import { contentTopicToPubsubTopic, Logger } from "@waku/utils";
|
|
|
|
import { runNodes } from "../filter/single_node/utils.js";
|
|
|
|
// Constants for test configuration.
|
|
export const log = new Logger("test:lightpush");
|
|
export const TestContentTopic = "/test/1/waku-light-push/utf8";
|
|
export const ClusterId = 3;
|
|
export const TestPubsubTopic = contentTopicToPubsubTopic(
|
|
TestContentTopic,
|
|
ClusterId
|
|
);
|
|
export const TestShardInfo = {
|
|
contentTopics: [TestContentTopic],
|
|
clusterId: ClusterId
|
|
};
|
|
export const TestEncoder = createEncoder({
|
|
contentTopic: TestContentTopic,
|
|
pubsubTopic: TestPubsubTopic
|
|
});
|
|
export const messageText = "Light Push works!";
|
|
export const messagePayload = { payload: utf8ToBytes(messageText) };
|
|
|
|
export { runNodes };
|