Skip to content

Conversation

tcheeric
Copy link
Owner

@tcheeric tcheeric commented Aug 1, 2025

Summary

  • add unit tests for remaining NIP classes in the api module
  • cover creation of events and tags for many NIP implementations

Testing

  • mvn -q verify (fails: Previous attempts to find a Docker environment failed)

https://chatgpt.com/codex/tasks/task_b_688bf98e3b348331851b2272c9490331

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds comprehensive unit tests for NIP (Nostr Implementation Possibility) classes in the API module to improve test coverage and validate the creation of events and tags across multiple NIP implementations.

  • Covers 22 different NIP classes with basic unit tests
  • Tests event creation functionality and tag validation for various Nostr protocol features
  • Focuses on encryption/decryption, messaging, reactions, and metadata handling

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
NIP65Test.java Tests relay list metadata event creation
NIP46Test.java Tests request/response serialization and remote signing events
NIP44Test.java Tests encryption/decryption functionality and event processing
NIP42Test.java Tests authentication tag creation for relay and challenge tags
NIP40Test.java Tests expiration tag creation
NIP32Test.java Tests label namespace and label tag creation
NIP31Test.java Tests alternative description tag creation
NIP30Test.java Tests emoji tag creation
NIP28Test.java Tests channel creation event functionality
NIP25Test.java Tests reaction event creation for likes
NIP23Test.java Tests long-form text note events with title and image tags
NIP20Test.java Tests OK message creation for event responses
NIP15Test.java Tests product event creation for marketplace functionality
NIP14Test.java Tests subject tag creation
NIP12Test.java Tests hashtag, reference, and geohash tag creation
NIP09Test.java Tests event deletion functionality
NIP08Test.java Tests mention events with public key tags
NIP05Test.java Tests internet identifier metadata events
NIP04Test.java Tests encrypted direct message creation and decryption
NIP03Test.java Tests OpenTimestamps event creation

public void testCreateLongFormTextNoteEvent() throws Exception {
Identity sender = Identity.generateRandomIdentity();
NIP23 nip23 = new NIP23(sender);
nip23.creatLongFormTextNoteEvent("long");
Copy link
Preview

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method name 'creatLongFormTextNoteEvent' has a typo. It should be 'createLongFormTextNoteEvent' with an 'e' after 'creat'.

Suggested change
nip23.creatLongFormTextNoteEvent("long");
nip23.createLongFormTextNoteEvent("long");

Copilot uses AI. Check for mistakes.

@tcheeric tcheeric merged commit 7f8cf02 into develop Aug 1, 2025
@tcheeric tcheeric deleted the codex/add-nipxxtest-unit-test-classes branch August 1, 2025 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant