test: add envfile parser coverage#3015
Conversation
|
@HarshMN2345 Needed your review here ! |
Greptile SummaryThis PR adds 9 unit tests for Confidence Score: 5/5Safe to merge — the implementation fix is correct and all tests accurately reflect the new behaviour. No P0 or P1 issues found. The regex change is logically sound, the test expectations are correct against the updated implementation, and the CRLF case is handled correctly because trim() strips the trailing No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix: preserve embedded quotes in envfile..." | Re-trigger Greptile |
|
Fixes #3018 |
What does this PR do?
Adds unit test coverage for the .env parser helper used by environment variable import flows.
The tests cover parsing with = and : separators, whitespace trimming, quoted values, values containing separators, ignored
malformed/comment lines, and empty values.
Test Plan
Ran the targeted test file:
bun vitest run src/lib/helpers/envfile.test.tsRan the full unit test suite:
bun run test:unitBoth passed.
Related PRs and Issues
N/A
Have you read the Contributing Guidelines on issues?(https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)
Yes.