Skip to content

test: integration tests for Request to Vanish (Kind 62) #503

@phoenix-server

Description

@phoenix-server

Summary

Kind 62 (Request to Vanish) triggers the VanishEventStrategy, which deletes all stored events for the sender's pubkey (except kind 62 itself) and marks the user as vanished. This is a destructive, irreversible flow with zero integration test coverage.

What to test

  • After sending kind 62, a subsequent REQ for that pubkey's events returns only the kind 62 vanish event (all others deleted)
  • After vanishing, any new events published by that pubkey must be rejected
  • The kind 62 event itself is stored and retrievable

Relevant code

  • src/handlers/event-strategies/vanish-event-strategy.ts
  • src/factories/event-strategy-factory.ts
  • src/repositories/event-repository.tsdeleteByPubkeyExceptKinds
  • src/repositories/user-repository.tssetVanished

Suggested location

test/integration/features/nip-62/nip-62.feature (or a dedicated vanish feature file)

Metadata

Metadata

Assignees

Labels

testUnit or integration test improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions