Tustin / PlayStationDiscord

Discord Rich Presence for PlayStation 4, PlayStation 3, and PlayStation Vita games.
https://tustin.dev/PlayStationDiscord/
GNU General Public License v3.0
391 stars 101 forks source link

Add automated tests #137

Closed RA80533 closed 3 years ago

RA80533 commented 3 years ago

Is your feature request related to a problem? Please describe. Commit c457fc1 fixed an issue with logging in to PSN. Taking a look at the changes, it becomes clear exactly why the issue came about in the first place: there are no automated tests to verify it previously worked.

Describe the solution you'd like Every feature shared between files should have at least one automated test.

Additional context The documentation for the Jest testing framework is a useful starting point.

Tustin commented 3 years ago

Not possible. The sole reason why login fails is due to Akamai's bot mitigation software that Sony uses for the login form. Automated tests would trigger that exact problem.

RA80533 commented 3 years ago

For features such as interacting with an external API, testing need not exist to test genuine flows of execution but rather simulate expected outcomes from such flows of execution. In this case, something that is "not possible" suggests the feature does not work at all.

Under what conditions does a genuine login succeed?

Regardless, I should've titled the issue a bit differently to apply specifically to verifying the fix from #77. The general issue of automated tests still applies throughout the repository.