Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipe's inline alternative UOM. Closes #154. #155

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

jlucaspains
Copy link
Owner

@jlucaspains jlucaspains commented Oct 5, 2024

This pull request enhances the parseIngredient function to handle alternative quantities and adds relevant test cases to ensure functionality. The most important changes include the addition of logic to parse alternative quantities, updating the getQuantity function to accept an index parameter, and expanding test coverage for both English and Portuguese.

Enhancements to parseIngredient function:

Function updates:

  • src/ingredientParser.js: Modified getQuantity function to accept an optional index parameter, allowing more flexible quantity parsing.

Test coverage improvements:

  • test/index_en.spec.js: Added test cases for parsing ingredients with alternative quantities in English.
  • test/index_pt.spec.js: Added test cases for parsing ingredients with alternative quantities in Portuguese.

@jlucaspains jlucaspains merged commit d358c25 into main Oct 5, 2024
2 checks passed
Copy link

sonarqubecloud bot commented Oct 5, 2024

@jlucaspains jlucaspains deleted the feature/alt-inline-uoms branch October 5, 2024 23:00
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