From 9593a8a8a5b87c5feed88b45aecf095b76f069c4 Mon Sep 17 00:00:00 2001 From: Florin Barbu Date: Wed, 25 Oct 2023 10:39:04 +0300 Subject: [PATCH] test: fix ci logs (#1687) * fix ci logs * replace lodash with uint8arrays/equals --- .github/workflows/ci.yml | 4 ++-- packages/tests/package.json | 2 -- packages/tests/src/message_collector.ts | 4 ++-- packages/tests/tests/store/index.node.spec.ts | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f57da9be15..dac1e009da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,14 +87,14 @@ jobs: with: nim_wakunode_image: wakuorg/go-waku:latest test_type: go-waku-master - debug: waku* + debug: js-waku* node_with_nwaku_master: uses: ./.github/workflows/test-node.yml with: nim_wakunode_image: wakuorg/nwaku:deploy-wakuv2-test test_type: nwaku-master - debug: waku* + debug: js-waku* maybe-release: name: release diff --git a/packages/tests/package.json b/packages/tests/package.json index 8a849816b8..402401b297 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -60,7 +60,6 @@ "chai-as-promised": "^7.1.1", "debug": "^4.3.4", "dockerode": "^3.3.5", - "lodash": "^4.17.21", "p-retry": "^6.1.0", "p-timeout": "^6.1.0", "portfinder": "^1.0.32", @@ -71,7 +70,6 @@ "@libp2p/bootstrap": "^9.0.2", "@types/chai": "^4.3.5", "@types/dockerode": "^3.3.19", - "@types/lodash": "^4.14.199", "@types/mocha": "^10.0.1", "@types/sinon": "^10.0.16", "@types/tail": "^2.2.1", diff --git a/packages/tests/src/message_collector.ts b/packages/tests/src/message_collector.ts index 5f7a473688..5018b55453 100644 --- a/packages/tests/src/message_collector.ts +++ b/packages/tests/src/message_collector.ts @@ -2,7 +2,7 @@ import { DecodedMessage, DefaultPubSubTopic } from "@waku/core"; import { Logger } from "@waku/utils"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { AssertionError, expect } from "chai"; -import isEqual from "lodash/isEqual"; +import { equals } from "uint8arrays/equals"; import { MessageRpcResponse } from "./node/interfaces.js"; @@ -45,7 +45,7 @@ export class MessageCollector { return message.payload === text; } else if (message.payload instanceof Uint8Array) { log.info(`Checking payload: ${bytesToUtf8(message.payload)}`); - return isEqual(message.payload, utf8ToBytes(text)); + return equals(message.payload, utf8ToBytes(text)); } return false; }); diff --git a/packages/tests/tests/store/index.node.spec.ts b/packages/tests/tests/store/index.node.spec.ts index 1b54c84e93..e58c7bdfa6 100644 --- a/packages/tests/tests/store/index.node.spec.ts +++ b/packages/tests/tests/store/index.node.spec.ts @@ -19,7 +19,7 @@ import { } from "@waku/message-encryption/symmetric"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { expect } from "chai"; -import isEqual from "lodash/isEqual"; +import { equals } from "uint8arrays/equals"; import { delay, @@ -159,7 +159,7 @@ describe("Waku Store, general", function () { createDecoder(testItem["value"]) ])) { for await (const msg of query) { - expect(isEqual(msg!.payload, utf8ToBytes(messageText))).to.eq(true); + expect(equals(msg!.payload, utf8ToBytes(messageText))).to.eq(true); } } }