From 79c3f8677070be21177b5deee3807deae1ffc2d9 Mon Sep 17 00:00:00 2001 From: Irina Dumitrascu Date: Wed, 21 Mar 2012 13:07:57 +0000 Subject: [PATCH 1/2] Added a section on how to run the tests. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 55087e982..7f78f7ec7 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,17 @@ See the [sinon project homepage](http://sinonjs.org/) Check out [todo.org](http://github.com/cjohansen/Sinon.JS/raw/1.0.0/todo.org) in the project repository +### Run the tests + +* Install node & npm +* npm install buster-format +* Install java +* download jsTestDriver +* run `java -jar JsTestDriver.jar --port 4224` to start the JsTestDriver server +* go to http://localhost:4224/ and click 'Capture this Browser' +* run `java -jar JsTestDriver.jar --tests all --reset` + + ## Running tests on Rhino I've added a rudimentary setup for running the tests on Rhino with env.js (as From 5c443f9d5779e97c4da0ce1734a1f094c99011a3 Mon Sep 17 00:00:00 2001 From: Irina Dumitrascu Date: Fri, 23 Mar 2012 11:55:51 +0000 Subject: [PATCH 2/2] Readme: added how to run tests on Node --- README.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7f78f7ec7..e469594da 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ Standalone and test framework agnostic JavaScript test spies, stubs and mocks. -## Installation +## Installation via [npm (node package manager)](http://github.com/isaacs/npm) $ npm install sinon -or install via git by cloning the repository and including sinon.js +or install via git by cloning the repository and including sinon.js in your project, as you would any other third party library. Don't forget to include the parts of Sinon.JS that you want to use as well @@ -27,22 +27,31 @@ See the [sinon project homepage](http://sinonjs.org/) * Easily fake any interface * Ship with ready-to-use fakes for XMLHttpRequest, timers and more -## Develop? +## Develop? Check out [todo.org](http://github.com/cjohansen/Sinon.JS/raw/1.0.0/todo.org) in the project repository -### Run the tests +## Run the tests -* Install node & npm -* npm install buster-format -* Install java -* download jsTestDriver -* run `java -jar JsTestDriver.jar --port 4224` to start the JsTestDriver server -* go to http://localhost:4224/ and click 'Capture this Browser' -* run `java -jar JsTestDriver.jar --tests all --reset` +### On Node -## Running tests on Rhino + $ node test/node/run.js + +### In the browser, via JsTestDriver + +* Install [Node.js](http://nodejs.org/) & [NPM](http://npmjs.org/) +* `$ npm install buster-format` +* Install Java +* Download [jsTestDriver](http://code.google.com/p/js-test-driver/) +* Start the JsTestDriver server + `$ java -jar JsTestDriver.jar --port 4224` +* Open a browser, go to [http://localhost:4224/](http://localhost:4224) and click 'Capture this Browser' +* run the tests + `$ java -jar JsTestDriver.jar --tests all --reset` + + +### On Rhino I've added a rudimentary setup for running the tests on Rhino with env.js (as this is a fairly common test setup, Sinon should support it). The files are