sportsdataverse / sportsdataverse-js

Retrieves sports data from a popular sports website as well as from the NCAA website, with support for NBA, WNBA, NFL, NHL, College Football and mens and womens college basketball,
https://js.sportsdataverse.org
49 stars 12 forks source link

Testing refactors #19

Closed unmonk closed 1 year ago

unmonk commented 1 year ago

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[bot] commented 1 year ago

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
unmonk commented 1 year ago

NB = nota bene?