Skip to content

test(server): standardize integration-test SUFFIX on hyphen separator - #3661

Merged
bokelley merged 1 commit into
mainfrom
bokelley/fix-test-suffix-underscores
Apr 30, 2026
Merged

bokelley merged 1 commit into
mainfrom
bokelley/fix-test-suffix-underscores

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #3656. Three integration test files still used \${process.pid}_\${Date.now()} (underscore separator) for their PID+timestamp SUFFIX:

  • server/tests/integration/property-enhancement-function.test.ts
  • server/tests/integration/brand-properties-parse.test.ts
  • server/tests/integration/addie-brand-property-tools.test.ts

Underscores are invalid in domain names per RFC 1035. These three pass today because their TEST_DOMAIN never hits a regex-validating code path — property-enhancement skips validation; brand-properties-parse and addie-brand-property-tools mock the routes that would. But the next test that adds a real enrichBrand / expandHouse call would rediscover the same bug #3656 just fixed.

Switched to a hyphen across the board to match the convention established in #3656 (brand-classifier-route, brand-enrichment-route, prospect-triage). No behavior change for the existing tests — org/user IDs are still opaque strings, just with a hyphen instead of an underscore in the suffix.

Surfaced as a follow-up nit during the code-reviewer and nodejs-testing-expert reviews of #3655 (closed as superseded by #3656). Both flagged these three files as latent traps.

Verification

  • 39/39 tests pass across the three affected files locally.
  • Pre-commit (typecheck + unit tests) green.

🤖 Generated with Claude Code

Follow-up to #3656. Three integration test files still used
`${process.pid}_${Date.now()}` (underscore separator) for their PID+timestamp
SUFFIX:

- property-enhancement-function.test.ts
- brand-properties-parse.test.ts
- addie-brand-property-tools.test.ts

Underscores are invalid in domain names per RFC 1035. These three pass
today because their TEST_DOMAIN never hits a regex-validating code path —
property-enhancement skips validation; brand-properties-parse and
addie-brand-property-tools mock out the routes that would. But the next test
that adds a real `enrichBrand` / `expandHouse` call would rediscover the bug
that #3656 just fixed.

Switched to a hyphen across the board to match the convention established in
#3656 (`brand-classifier-route`, `brand-enrichment-route`, `prospect-triage`).
No behavior change for the existing tests; org/user IDs are still opaque
strings, just with a hyphen instead of an underscore in the suffix.

Verified locally: 39/39 tests pass across the three affected files.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@bokelley
bokelley merged commit 534a28d into main Apr 30, 2026
13 checks passed
@bokelley
bokelley deleted the bokelley/fix-test-suffix-underscores branch April 30, 2026 12:01
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.

1 participant