LoungeDestroyer icon indicating copy to clipboard operation
LoungeDestroyer copied to clipboard

Unit testing

Open ncla opened this issue 10 years ago • 3 comments

We need it.

ncla avatar Oct 10 '14 08:10 ncla

Some input from someone experienced with this would be nice.

ncla avatar Jan 26 '15 13:01 ncla

I'll dig into this once I finish up the site and logo. Unit testing is going to be difficult since, from what I've seen at least, most of the functionality is actually completely coupled with the user interface. There aren't many functions that simply manipulate data, or do some basic functionality that fits unit testing. Correct me if I'm wrong.

That being said, ui tests that interact with the csgolounge interface will do the job. I'd vote on http://webdriver.io/ for UI bindings/actions and mocha for testing framework (that provides assertions etcetc).

JakeHP avatar Jan 27 '15 01:01 JakeHP

Wrote my first few tests for Items class, only took 7 months to finally get started. :D

Not finished yet, there needs to be some refactoring done, for example fetchSteamMarketPrice does not have any callbacks therefor I cannot really test it, yet.

To install it just npm install mocha and npm install chai, then you just open tests.html in the browser and it should run the tests.

ncla avatar Apr 09 '15 14:04 ncla