Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 28, 2012
1 parent 2c66d31 commit 2bf5726
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Readme.md
Expand Up @@ -13,7 +13,7 @@
already listening for connections then it is bound to an ephemeral port for you so
there is no need to keep track of ports.

SuperTest works with any test framework, here is an example without using any
SuperTest works with any test framework, here is an example without using any
test framework at all:

```js
Expand Down Expand Up @@ -78,11 +78,12 @@ request(app)
...
```

When using supertest with a url instead of passing a server or "app",
you may bind the initial value to prevent redundancy:
Passing the app or url each time is not necessary, if you're testing
the same host you may simply re-assign the request variable with the
initialization app or url, a new `Test` is created per `request.VERB()` call.

```js
request = request.bind(request, 'http://localhost:5555');
request = request('http://localhost:5555');

request.get('/').expect(200, function(err){
console.log(err);
Expand Down Expand Up @@ -126,4 +127,4 @@ request.get('/').expect('heya', function(err){

## License

MIT
MIT

0 comments on commit 2bf5726

Please sign in to comment.