Skip to content

test: add NIP-17 gift wrap integration tests#529

Merged
cameri merged 3 commits intocameri:mainfrom
Anshumancanrock:test/nip17-gift-wrap-integration
Apr 19, 2026
Merged

test: add NIP-17 gift wrap integration tests#529
cameri merged 3 commits intocameri:mainfrom
Anshumancanrock:test/nip17-gift-wrap-integration

Conversation

@Anshumancanrock
Copy link
Copy Markdown
Collaborator

Description

Adds end-to-end integration coverage for NIP-17 gift wrap validation. It covers one accepted path and the requested rejection/query cases: missing p tag, multiple p tags, malformed NIP-44 payload, and recipient lookup via #p filter.

Related Issue

Closes #504

Motivation and Context

Gift wrap validation rules existed in strategy code but were not covered by integration tests. This adds regression coverage for expected behavior and error messages.

How Has This Been Tested?

  • npm run build:check
  • npx biome lint test/integration/features/nip-17/nip-17.feature.ts
  • npx cucumber-js --dry-run test/integration/features/nip-17/nip-17.feature
  • pre-commit checks: npm run lint, npm run build:check, npm run test:unit (844 passing)
  • full cucumber execution in this local environment currently times out in the shared BeforeAll hook

Screenshots (if appropriate):

N/A

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.
  • All new and existing tests passed.

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 19, 2026

Coverage Status

coverage: 71.16% (+2.5%) from 68.698% — Anshumancanrock:test/nip17-gift-wrap-integration into cameri:main

@Anshumancanrock
Copy link
Copy Markdown
Collaborator Author

Hi @cameri , I used "Anshuman" as the actor name instead of "Alice" in the new NIP-17 integration scenarios. I noticed most existing integration tests use Alice/Bob naming, so I'm happy to switch back to "Alice" for consistency if you'd prefer :)

@cameri
Copy link
Copy Markdown
Owner

cameri commented Apr 19, 2026

@Anshumancanrock let's please stick to generic names please (Alice, Bob, Charlie)

@cameri cameri self-assigned this Apr 19, 2026
@Anshumancanrock
Copy link
Copy Markdown
Collaborator Author

@Anshumancanrock let's please stick to generic names please (Alice, Bob, Charlie)

@cameri Done !

@cameri cameri merged commit 22d971a into cameri:main Apr 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: integration tests for NIP-17 Gift Wrap (Kind 1059) validation

3 participants