Skip to content

test: add unit tests for getSearchBaseUrl#972

Open
amisha1072006 wants to merge 3 commits intoopenfoodfacts:mainfrom
amisha1072006:test/getSearchBaseUrl
Open

test: add unit tests for getSearchBaseUrl#972
amisha1072006 wants to merge 3 commits intoopenfoodfacts:mainfrom
amisha1072006:test/getSearchBaseUrl

Conversation

@amisha1072006
Copy link

This PR adds unit tests for getSearchBaseUrl.

Tests cover:

  • Throwing an error when PUBLIC_SEARCH_BASE_URL is empty
  • Returning the base URL when it is set

No functional changes were made to search.ts.
All tests pass locally.

@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview, Comment Feb 24, 2026 5:35pm

"sourceMap": true,
"strict": true
"strict": true,
"types": ["vitest/globals"]
Copy link
Member

Choose a reason for hiding this comment

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

Can we limit this to tests? You should create another ts config, exclude test files from this one and include them in the new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants