sinon-qunit icon indicating copy to clipboard operation
sinon-qunit copied to clipboard

Inject sinon sandbox in the current module before the QUnit module's setup()` method is invoked.

Open jonnyreeves opened this issue 11 years ago • 3 comments

This allows the developer to initiate their stubs, mocks and spies in the setup method, safe in the knowledge that they will be automatically reset between each test.

I had trouble getting the jsTestDriver unit tests to work (and wasn't 100% sure what coverage I should be adding!)

jonnyreeves avatar Apr 28 '13 18:04 jonnyreeves

To run the JsTestDriver tests:

  • Download JsTestDriver
  • Start the server: java -jar JsTestDriver-1.3.5.jar --port 4224
  • Capture browser
  • Run tests: cd path/to/sinon-qunit && java -jar JsTestDriver-1.3.5.jar --tests all

You should add a test using setup/teardown to demonstrate that this works.

cjohansen avatar Apr 29 '13 06:04 cjohansen

Any thoughts on this?

jonnyreeves avatar Aug 29 '13 14:08 jonnyreeves

:+1:

JeffFaer avatar Jul 15 '14 12:07 JeffFaer