Skip to content

Commit

Permalink
fix: imports
Browse files Browse the repository at this point in the history
  • Loading branch information
danisharora099 committed Jan 16, 2024
1 parent 6d5d5e2 commit ec2905a
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 14 deletions.
3 changes: 1 addition & 2 deletions packages/tests/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@

export * from "./utils/index.js";
export * from "./constants.js";
export * from "./lib/service_node.js";
export * from "./message_collector.js";
export * from "./lib/index.js";
2 changes: 2 additions & 0 deletions packages/tests/src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from "./message_collector.js";
export * from "./service_node.js";
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes";
import { AssertionError, expect } from "chai";
import { equals } from "uint8arrays/equals";

import { MessageRpcResponse } from "./types.js";

import { base64ToUtf8, delay, ServiceNode } from "./index.js";
import { base64ToUtf8, delay, ServiceNode } from "../index.js";
import { MessageRpcResponse } from "../types.js";

const log = new Logger("test:message-collector");

Expand Down
2 changes: 2 additions & 0 deletions packages/tests/src/utils/async_fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ export async function waitForFile(path: string): Promise<void> {
}
} while (!found);
}

export * from "./log_file.js";
2 changes: 2 additions & 0 deletions packages/tests/src/utils/delay.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export function delay(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}

export * from "./async_fs.js";
2 changes: 0 additions & 2 deletions packages/tests/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export * from "./async_fs.js";
export * from "./generate_test_data.js";
export * from "./log_file.js";
export * from "./teardown.js";
export * from "./random_array.js";
export * from "./wait_for_remote_peer_with_codec.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/src/utils/teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Waku } from "@waku/interfaces";
import { Logger } from "@waku/utils";
import pRetry from "p-retry";

import { ServiceNode } from "../index.js";
import { ServiceNode } from "../lib/service_node.js";

const log = new Logger("test:teardown");

Expand Down
2 changes: 1 addition & 1 deletion packages/tests/tests/connection_manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { createLightNode } from "@waku/sdk";
import { expect } from "chai";
import sinon, { SinonSpy, SinonStub } from "sinon";

import { delay } from "../dist/delay.js";
import { delay } from "../src/index.js";
import { makeLogFileName, ServiceNode, tearDownNodes } from "../src/index.js";

const TEST_TIMEOUT = 10_000;
Expand Down
7 changes: 5 additions & 2 deletions packages/tests/tests/filter/ping.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import type { IFilterSubscription, LightNode } from "@waku/interfaces";
import { utf8ToBytes } from "@waku/utils/bytes";
import { expect } from "chai";

import { ServiceNode, tearDownNodes } from "../../src/index.js";
import { MessageCollector } from "../../src/message_collector.js";
import {
MessageCollector,
ServiceNode,
tearDownNodes
} from "../../src/index.js";

import {
runNodes,
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/tests/relay/subscribe.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("Waku Relay, Subscribe", function () {
});
await waku1.dial(waku2.libp2p.peerId);
log.info("before each hook done");
messageCollector = new MessageCollector();
messageCollector = new MessageCollector(this.nwaku);
});

afterEach(async function () {
Expand Down
4 changes: 2 additions & 2 deletions packages/tests/tests/store/index.node.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe("Waku Store, general", function () {
}

waku = await startAndConnectLightNode(nwaku);
const messageCollector = new MessageCollector();
const messageCollector = new MessageCollector(nwaku);
messageCollector.list = await processQueriedMessages(
waku,
[TestDecoder],
Expand Down Expand Up @@ -125,7 +125,7 @@ describe("Waku Store, general", function () {
);
waku = await startAndConnectLightNode(nwaku);

const messageCollector = new MessageCollector();
const messageCollector = new MessageCollector(nwaku);
messageCollector.list = await processQueriedMessages(
waku,
[TestDecoder, secondDecoder],
Expand Down

0 comments on commit ec2905a

Please sign in to comment.