Skip to content

test(lib): add coverage for propertyService filters and id lookup - #978

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Dataguru-tech:test/property-service-coverage
Aug 31, 2026
Merged

test(lib): add coverage for propertyService filters and id lookup#978
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
Dataguru-tech:test/property-service-coverage

Conversation

@Dataguru-tech

Copy link
Copy Markdown

Summary
Adds unit tests for propertyService.ts (the property data layer), which previously had no coverage.

What's covered

  • searchProperties: filtering by property type, price range, location, and combined filters
  • searchProperties: empty-result case when no property matches the filters
  • getPropertyById: valid id lookup and missing id (returns null)

Redis, IndexedDB, and network-status checks are mocked so tests exercise the actual filter/sort/lookup logic against MOCK_PROPERTIES rather than the caching layer. This pins the current filter contract so the mock-to-real-API migration (#13) can't silently change listing behavior.

Out of scope
The properties API mock (#13) and the API route — per the issue.
Closes #929

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Dataguru-tech 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

@nanaf6203-bit
nanaf6203-bit merged commit 3a16f9f into MettaChain:main Aug 31, 2026
@github-actions

Copy link
Copy Markdown

🔒 Preview Environment Destroyed

The preview environment for this PR has been torn down.

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.

propertyService has no tests: the property data layer is uncovered

3 participants