test: nwaku's store now reject messages older than 20s

This commit is contained in:
fryorcraken.eth 2022-11-15 14:15:55 +11:00
parent 862a33f239
commit c3c3833b1b
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 8 additions and 8 deletions

View File

@ -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(