Reputation: 401
I'm piecing together a jsTestDriver/Jasmine environment for testing our front end code and I'm seeing a lot of references to Sinon.js for stand-alone (or drop in) spies. Could someone describe what Sinon.js brings to the table that Jasmine doesn't for testing the UI?
Upvotes: 20
Views: 3634
Reputation: 1006
* Posting it as an answer, since this didn't fit in the Comments section! *
FWIW, We used SinonJS to create a FakeHTTP(LinearEPG)server component for implementing the REST-APIs of the real-server that hosts the EPG(Linear TV Program Schedule) info.
Then, we used this FakeHTTP-LinearEPG server in two modalities:
Granted, we could have implemented the FakeServer functionality using Jasmine-Spies, but it seemed to be bit convoluted. On the other hand, the FakeServer provided an elegant and quick way to emulate the Server providing the REST-interfaces.
SinonJS-based FakeServer proved to be quite useful when the server itself was still under development at that time!
Upvotes: 5