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

Testing refactors #19

Merged
merged 3 commits into from
Jun 30, 2023
Merged

Conversation

unmonk
Copy link
Contributor

@unmonk unmonk commented Jun 21, 2023

Resolves #18

Also adds the start of tennis: getScoreboard

This should fix tests so they are actually running, and fixes any issues that arose.
There are some issues lingering with some of the cdn based calls returning unparsed html, and 404 on the ranking ones.

If you run an npm test locally, you should see a report in
mochawesome-report/mochawesome.html

I've verified things are still working as expected for the few calls I use, but I have not thoroughly tested each one. Would rely on the community for that.

 140 passing (59s)
  11 failing

  1) MBB Rankings
       should populate rankings for the current week and year:
     Error: Request failed with status code 404


  2) MBB Rankings
       should populate rankings for the given week and year:
     Error: Request failed with status code 404


  3) MBB Rankings
       should return a promise for rankings for the current week and year:
     Error: Request failed with status code 404

  4) MBB Rankings
       should return a promise for rankings for the given week and year:
     Error: Request failed with status code 404


  5) MBB Recruiting
       should return a promise for a school's commit list for a given year:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/dev/sportsdataverse-js/test/mbb.test.js)


  6) NCAA Games
       should return a promise for ncaa game team stats for a given game:
     Error: Request failed with status code 404


  7) NCAA Games
       should return a promise for ncaa game scoring summary for a given game:
     Error: Request failed with status code 404


  8) WBB Rankings
       should populate rankings for the current week and year:
     Error: Request failed with status code 404


  9) WBB Rankings
       should populate rankings for the given week and year:
     Error: Request failed with status code 404


  10) WBB Rankings
       should return a promise for rankings for the current week and year:
     Error: Request failed with status code 404

  11) WBB Rankings
       should return a promise for rankings for the given week and year:
     Error: Request failed with status code 404
     

@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sportsdataverse-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 0:50am

Copy link
Collaborator

@saiemgilani saiemgilani left a comment

Choose a reason for hiding this comment

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

Two notes:

  • Remove this rankings.json file, I believe that was not intended to be included?
  • I am wondering if tnns is a bit too cute for an abbreviation of a service? I feel like the most clear and obvious (if verbose) name would be tennis. Given that the name of the service also winds up being in the url, it is probably prudent to change it to tennis

NB: since you're now a member (and admin user) of the SDV org, please just make future PR's on the SDV org repo

General Comments:
I really love the mochawesome report you added, as well as all the changes you've made thus far. I have solves for the rankings functions (and the recruiting stuff.. but that'll take a little more involved doing), but the NCAA stuff will probably need some fixes or less rigor possibly once I fully investigate the test cases. Your contributions are super appreciated and I'm glad you were able to implement the should library change for testing without any issue. Took a bit off my plate that I would have dragged my feet on.

@saiemgilani saiemgilani added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request labels Jun 25, 2023
@unmonk
Copy link
Contributor Author

unmonk commented Jun 30, 2023

  • Removed that extra json file, that was left in by accident.
  • Renamed tnns to tennis

NB = nota bene?

@unmonk unmonk requested a review from saiemgilani June 30, 2023 00:51
@saiemgilani saiemgilani merged commit 71e7fc2 into sportsdataverse:main Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests not failing
2 participants