Closed alfg closed 7 years ago
I like to take it if nobody else is working on it
@vomitaftertaste Go for it! :)
@alfg how do you wanted the test to be written? Should I have a html file saved/hardcoded and then do some kind of stub for request-promise? Or you want it to just call overwatch server? so that the test will know if some html changes happens.
Lets try the second option. I think it'll be helpful in case the DOM changes to catch fixes.
Since the stats/profile can change over time, we can just test for the types and general data structure sent back.
Write AVA unit tests for the profile and stats parsers:
https://github.com/alfg/overwatch-api/blob/master/app/parser/profile.js https://github.com/alfg/overwatch-api/blob/master/app/parser/stats.js