-
Notifications
You must be signed in to change notification settings - Fork 46
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 new API Property - alcohol_prohibition #48
Comments
Would want to work upon this, was just wondering if I had to manually update every field in data.json? or is there other things developers do? |
@damn-dvlpr since we collect that data and let API consumers use it, we need to provide it. Because of that, there are 3 things that have to be done:
You can check some of Pull Requests to see more details. |
Alright! would start working upon it. |
@sthiepaan i have made a pull request #57 implementing this, can you please review it. |
@damn-dvlpr thanks you, I will have a look at it soon.
First of all you need to be a little bit fammiliar with Jasmine Framework. Then you can go to // ...
describe("The getAllCountries", () => {
it("returns all of the countries", () => {
expect(countryApi.getAllCountries().length).toEqual(196);
});
});
// ... is a test case that check if the Hope this gives you better overview! ✌️ PS: If you put an id of issue into description of Pull Request, it will be automatically mentioned on the issue itself. You can check one of my PRs to see how I do this, to make readable PR description 😉 |
Alright, will be doing it today. Btw, the tests are currently broken cause someone added the "drive direction" attritube and didn't update the tests for the same. Would fix that too. |
@damn-dvlpr I had no error at all when I ran tests. What error did you have? |
Oh! i am really sorry, guess the fails are because of mine added fields |
This is actually why tests are awesome! 😉 They let you control the state of your code whether it still works properly or something unexpected happen. If we don't have a tests and extend some stuff, we might be in a situation where something is broken on production code. In that case, because you added new properties, you need to update tests, so they have proper expected values. |
I think the PR is ready to be merged, please review it. |
Also, thanks for the "PR description" suggestions, learned a new and cleaner way today! |
After short introduction in #32 we decided to extend this package with
alcohol_prohibition
Property:alcohol_prohibition
Property is a one ofString
After adding new property, each Country {Object} should contain:
Additionally there will be new method to use that data:
getCountriesByAlcoholProhibition(prohibitionType)
The text was updated successfully, but these errors were encountered: