test: fix flaky test

This commit is contained in:
fryorcraken.eth 2022-11-17 11:05:55 +11:00
parent 909a8f94c2
commit b6faebc422
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import { expect } from "chai";
import debug from "debug"; import debug from "debug";
import { makeLogFileName, NOISE_KEY_1, NOISE_KEY_2, Nwaku } from "../src"; import { makeLogFileName, NOISE_KEY_1, NOISE_KEY_2, Nwaku } from "../src";
import { delay } from "../src/delay";
const log = debug("waku:test:store"); const log = debug("waku:test:store");
@ -204,6 +205,7 @@ describe("Waku Store", () => {
}) })
) )
).to.be.true; ).to.be.true;
await delay(1); // to ensure each timestamp is unique.
} }
waku = await createFullNode({ waku = await createFullNode({
@ -242,6 +244,7 @@ describe("Waku Store", () => {
}) })
) )
).to.be.true; ).to.be.true;
await delay(1); // to ensure each timestamp is unique.
} }
waku = await createFullNode({ waku = await createFullNode({
@ -599,6 +602,7 @@ describe("Waku Store", () => {
}) })
) )
).to.be.true; ).to.be.true;
await delay(1); // to ensure each timestamp is unique.
} }
waku = await createFullNode({ waku = await createFullNode({