test: fix ci logs (#1687)

* fix ci logs

* replace lodash with uint8arrays/equals
This commit is contained in:
Florin Barbu 2023-10-25 10:39:04 +03:00 committed by GitHub
parent 1ec0c200ca
commit 9593a8a8a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 8 deletions

View File

@ -87,14 +87,14 @@ jobs:
with: with:
nim_wakunode_image: wakuorg/go-waku:latest nim_wakunode_image: wakuorg/go-waku:latest
test_type: go-waku-master test_type: go-waku-master
debug: waku* debug: js-waku*
node_with_nwaku_master: node_with_nwaku_master:
uses: ./.github/workflows/test-node.yml uses: ./.github/workflows/test-node.yml
with: with:
nim_wakunode_image: wakuorg/nwaku:deploy-wakuv2-test nim_wakunode_image: wakuorg/nwaku:deploy-wakuv2-test
test_type: nwaku-master test_type: nwaku-master
debug: waku* debug: js-waku*
maybe-release: maybe-release:
name: release name: release

View File

@ -60,7 +60,6 @@
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"debug": "^4.3.4", "debug": "^4.3.4",
"dockerode": "^3.3.5", "dockerode": "^3.3.5",
"lodash": "^4.17.21",
"p-retry": "^6.1.0", "p-retry": "^6.1.0",
"p-timeout": "^6.1.0", "p-timeout": "^6.1.0",
"portfinder": "^1.0.32", "portfinder": "^1.0.32",
@ -71,7 +70,6 @@
"@libp2p/bootstrap": "^9.0.2", "@libp2p/bootstrap": "^9.0.2",
"@types/chai": "^4.3.5", "@types/chai": "^4.3.5",
"@types/dockerode": "^3.3.19", "@types/dockerode": "^3.3.19",
"@types/lodash": "^4.14.199",
"@types/mocha": "^10.0.1", "@types/mocha": "^10.0.1",
"@types/sinon": "^10.0.16", "@types/sinon": "^10.0.16",
"@types/tail": "^2.2.1", "@types/tail": "^2.2.1",

View File

@ -2,7 +2,7 @@ import { DecodedMessage, DefaultPubSubTopic } from "@waku/core";
import { Logger } from "@waku/utils"; import { Logger } from "@waku/utils";
import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes";
import { AssertionError, expect } from "chai"; import { AssertionError, expect } from "chai";
import isEqual from "lodash/isEqual"; import { equals } from "uint8arrays/equals";
import { MessageRpcResponse } from "./node/interfaces.js"; import { MessageRpcResponse } from "./node/interfaces.js";
@ -45,7 +45,7 @@ export class MessageCollector {
return message.payload === text; return message.payload === text;
} else if (message.payload instanceof Uint8Array) { } else if (message.payload instanceof Uint8Array) {
log.info(`Checking payload: ${bytesToUtf8(message.payload)}`); log.info(`Checking payload: ${bytesToUtf8(message.payload)}`);
return isEqual(message.payload, utf8ToBytes(text)); return equals(message.payload, utf8ToBytes(text));
} }
return false; return false;
}); });

View File

@ -19,7 +19,7 @@ import {
} from "@waku/message-encryption/symmetric"; } from "@waku/message-encryption/symmetric";
import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes"; import { bytesToUtf8, utf8ToBytes } from "@waku/utils/bytes";
import { expect } from "chai"; import { expect } from "chai";
import isEqual from "lodash/isEqual"; import { equals } from "uint8arrays/equals";
import { import {
delay, delay,
@ -159,7 +159,7 @@ describe("Waku Store, general", function () {
createDecoder(testItem["value"]) createDecoder(testItem["value"])
])) { ])) {
for await (const msg of query) { for await (const msg of query) {
expect(isEqual(msg!.payload, utf8ToBytes(messageText))).to.eq(true); expect(equals(msg!.payload, utf8ToBytes(messageText))).to.eq(true);
} }
} }
} }