mirror of https://github.com/waku-org/js-waku.git
test: nwaku's store now reject messages older than 20s
This commit is contained in:
parent
862a33f239
commit
c3c3833b1b
|
@ -385,21 +385,21 @@ describe("Waku Store", () => {
|
|||
const now = new Date();
|
||||
|
||||
const startTime = new Date();
|
||||
// Set start time 5 minutes in the past
|
||||
startTime.setTime(now.getTime() - 5 * 60 * 1000);
|
||||
// Set start time 15 seconds in the past
|
||||
startTime.setTime(now.getTime() - 15 * 1000);
|
||||
|
||||
const message1Timestamp = new Date();
|
||||
// Set first message was 4 minutes in the past
|
||||
message1Timestamp.setTime(now.getTime() - 4 * 60 * 1000);
|
||||
// Set first message was 10 seconds in the past
|
||||
message1Timestamp.setTime(now.getTime() - 10 * 1000);
|
||||
|
||||
const message2Timestamp = new Date();
|
||||
// Set second message 2 minutes in the past
|
||||
message2Timestamp.setTime(now.getTime() - 2 * 60 * 1000);
|
||||
// Set second message 2 seconds in the past
|
||||
message2Timestamp.setTime(now.getTime() - 2 * 1000);
|
||||
const messageTimestamps = [message1Timestamp, message2Timestamp];
|
||||
|
||||
const endTime = new Date();
|
||||
// Set end time 1 minute in the past
|
||||
endTime.setTime(now.getTime() - 60 * 1000);
|
||||
// Set end time 1 second in the past
|
||||
endTime.setTime(now.getTime() - 1000);
|
||||
|
||||
for (let i = 0; i < 2; i++) {
|
||||
expect(
|
||||
|
|
Loading…
Reference in New Issue