Skip to content

test: integration tests for NIP-40 event expiration (standalone events) #502

Description

@phoenix-server

Summary

NIP-33 parameterized replaceable events already test the expiration tag in test/integration/features/nip-33/, but there are no integration tests covering expiration on ordinary (non-replaceable) events such as kind 1 text notes.

What to test

  • A kind 1 event published with an expiration tag set in the past must not be returned when queried via REQ
  • A kind 1 event published with an expiration tag set in the future must be returned normally via REQ
  • An event whose expiration passes after it was stored should not be served to new subscribers

Relevant code

  • src/constants/base.tsEventTags.Expiration
  • src/constants/base.tsEventExpirationTimeMetadataKey
  • src/repositories/event-repository.ts

Suggested location

test/integration/features/nip-40/nip-40.feature

Metadata

Metadata

Labels

testUnit or integration test improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions