Skip to content

Commit

Permalink
Bump version to 1.0.0 to get ready for new release. Small updates to …
Browse files Browse the repository at this point in the history
…Readme.
  • Loading branch information
mikelax committed May 10, 2015
1 parent 790fee1 commit bf2f5e7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
8 changes: 7 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
0.14.0 / 2014-09-29
1.0.0 / 2015-05-08
===================

* Bumping version to 1.0.0!, big changes with superagent
* Update superagent dependency to 1.2.0

0.15.0 / 2015-11-11

This comment has been minimized.

Copy link
@winniehell

winniehell May 19, 2015

2014?

===================

* Update superagent dependency
Expand Down
23 changes: 17 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SuperTest
# SuperTest [![Build Status](https://travis-ci.org/visionmedia/supertest.svg?branch=master)](https://travis-ci.org/visionmedia/supertest)

HTTP assertions made easy via [super-agent](http://github.com/visionmedia/superagent).

Expand Down Expand Up @@ -57,6 +57,22 @@ describe('GET /users', function(){
.expect(200, done);
})
})
```

One thing to note with the above statement is that superagent now sends any HTTP
error (anything other than a 2XX response code) to the callback as the first arguement. Example:

```js
describe('GET /redirect-url', function(){
it('respond with 302 redirect', function(done){
request(app)
.get('/redirect-url')
.expect(302, function (error) {
(error !== null).should.be.true;
done();
});
})
})
```

If you are using the `.end()` method `.expect()` assertions that fail will
Expand Down Expand Up @@ -110,13 +126,8 @@ var request = require('supertest')
, express = require('express');


var app = express();
app.use(express.cookieParser());


describe('request.agent(app)', function(){
var app = express();

app.use(express.cookieParser());

app.get('/', function(req, res){
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "supertest",
"version": "0.15.0",
"version": "1.0.0",
"description": "Super-agent driven library for testing HTTP servers",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit bf2f5e7

Please sign in to comment.