Skip to content

test: add unit tests for normalizeNameTag helper - #443

Open
young-wallace wants to merge 1 commit into
Abdulazeem-code:mainfrom
young-wallace:testing/normalize-name-tag
Open

test: add unit tests for normalizeNameTag helper#443
young-wallace wants to merge 1 commit into
Abdulazeem-code:mainfrom
young-wallace:testing/normalize-name-tag

Conversation

@young-wallace

@young-wallace young-wallace commented Jul 28, 2026

Copy link
Copy Markdown

Adds Jest unit tests for the normalizeNameTag federation helper.

Coverage:

  • Empty strings (including whitespace-only and non-string inputs) -> ''
  • Strings already containing '*' (returned trimmed, no suffix appended)
  • Standard strings (suffix '*localhost' appended after trim)

Tests follow the existing convention in tests/validateMemo.test.js (mocks for @stellar/stellar-sdk and prismaClient, helper pulled via require('../server')). No production code was modified; normalizeNameTag was already re-exported through server.js.

Closes #239

Cover empty strings, strings already containing '*', and standard strings to
verify normalizeNameTag returns expected federation formats (e.g. '*localhost'
suffix).
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@young-wallace is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@young-wallace Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Abdulazeem-code

Copy link
Copy Markdown
Owner

fix backend build error

1 similar comment
@Abdulazeem-code

Copy link
Copy Markdown
Owner

fix backend build error

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.

Write Unit Tests for normalizeNameTag Helper

2 participants